https://github.com/fmarot/test-categories
Some basic marker interface to be used as junit categories. As JUnit does not embed some by default, a multi-module Maven project has to have categories defined outside (or you face "Unable to load category" errors or recursive errors in case the categories are part of the build)
https://github.com/fmarot/test-categories
junit maven testing tests
Last synced: 2 months ago
JSON representation
Some basic marker interface to be used as junit categories. As JUnit does not embed some by default, a multi-module Maven project has to have categories defined outside (or you face "Unable to load category" errors or recursive errors in case the categories are part of the build)
- Host: GitHub
- URL: https://github.com/fmarot/test-categories
- Owner: fmarot
- License: apache-2.0
- Created: 2015-10-20T08:58:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-02-06T23:43:32.000Z (over 9 years ago)
- Last Synced: 2025-10-13T13:15:24.202Z (9 months ago)
- Topics: junit, maven, testing, tests
- Language: Java
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
:toc: macro
image:https://maven-badges.herokuapp.com/maven-central/com.teamtter.test/test-categories/badge.svg["Maven Central", link="http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.teamtter.test%22"]
toc::[]
= test-categories
== What's this ?
More info on how to use Maven and JUnit Categories here: http://stackoverflow.com/a/18297553/259988
== How to use
=== Maven dependency
This lib is available from Maven Central:
[source,xml]
-------------------------------------------
com.teamtter.test
test-categories
0.0.4
-------------------------------------------
=== Surefire configuration
You may configure your pom as demonstrated below.
This allows you to have GUI tests executed on your Continuous Integration (Jenkins ?) but not on the command line by default.
* GUI tests have to be annotated with the JUnit @Category annotation: @Test @Category(com.teamtter.test.categories.GuiTest.class)
* On your CI, add -DexcludeGUITests=com.teamtter.test.categories.None so that GUI tests are not excluded.
[source,xml]
-------------------------------------------
com.teamtter.test.categories.GuiTest
org.apache.maven.plugins
maven-surefire-plugin
2.19.1
${excludeGUITests}
-------------------------------------------