Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support default test naming scheme according to maven failsafe #54

Open
gucce opened this issue Sep 21, 2017 · 0 comments
Open

Support default test naming scheme according to maven failsafe #54

gucce opened this issue Sep 21, 2017 · 0 comments

Comments

@gucce
Copy link
Contributor

gucce commented Sep 21, 2017

Background

By default, the maven failsafe plugin includes tests with the following naming schemes (see documentation):

**/IT*.java - includes all of its subdirectories and all Java filenames that start with "IT".
**/*IT.java - includes all of its subdirectories and all Java filenames that end with "IT".
**/*ITCase.java - includes all of its subdirectories and all Java filenames that end with "ITCase".

Problem

By default, the Citrus admin UI sets filters on (copied from the default citrus-project.json):

"javaFilePattern" : "/**/*Test.java,/**/IT*.java",
"xmlFilePattern" : "/**/*Test.xml,/**/IT*.xml"

This is inconsistent with the default failsafe settings and will filter out tests which are correctly named integration tests, e.g. ITSomeIntegrationTest.java/xml (which is my naming scheme).

Moreover, some unit tests (which by default are run by surefire) are included in the Citrus admin UI.

According to the maven surefire documentation, the following naming schemes are included by default:

**/Test*.java - includes all of its subdirectories and all Java filenames that start with "Test".
**/*Test.java - includes all of its subdirectories and all Java filenames that end with "Test".
**/*Tests.java - includes all of its subdirectories and all Java filenames that end with "Tests".
**/*TestCase.java - includes all of its subdirectories and all Java filenames that end with "TestCase".

Solution

Adhere to the defaults set by the plugins which actually run the tests.

If unit tests which run with surefire should be executed at all (by default) by the Citrus UI is debatable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants