citrusframework / citrusframework/citrus-admin

Support default test naming scheme according to maven failsafe

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
Prio: Medium READY Type: Bug
Dominant language
Java
Stars
17
Forks
11
PR merge metrics
No merged PRs in 30d

Description

### Background

By default, the maven failsafe plugin includes tests with the following naming schemes (see [documentation](http://maven.apache.org/components/surefire/maven-failsafe-plugin/examples/inclusion-exclusion.html)):

```
**/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`):

```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](http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html), 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.