Skip to content

Support default test naming scheme according to maven failsafe #54

@gucce

Description

@gucce

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions