An open API service indexing awesome lists of open source software.

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)

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}


-------------------------------------------