pdolif opened a new issue, #3225:
URL: https://github.com/apache/maven-surefire/issues/3225
### Affected version
3.5.4
### Bug description
Given the following three test classes:
SubClass:
```java
import org.testng.annotations.Test;
public class SubClass extends SuperClass {
@Test
public void testInSubClass() {
System.out.println("TestNG: SubClass#testInSubClass executed");
}
}
```
SuperClass:
```java
import org.testng.annotations.Test;
public class SuperClass {
@Test
public void testInSuperClass() {
System.out.println("TestNG: SuperClass#testInSuperClass executed");
}
}
```
OtherClass:
```java
import org.testng.annotations.Test;
public class OtherClass {
@Test
public void testIncluded() {
System.out.println("TestNG: OtherClass#testIncluded executed");
}
@Test
public void testNotIncluded() {
System.out.println("TestNG: OtherClass#testNotIncluded executed");
}
}
```
When running the tests with `-Dtest=SubClass`, `testInSubClass` and
`testInSuperClass` are executed.
When using an includesFile containing SubClass only, the behavior is the
same.
Once the includesFile does not only contain class filters but also method
filters, the behavior is different, and `testInSuperClass` is not executed
anymore.
Example includesFile:
```
SubClass
OtherClass#testIncluded
```
With this, only `testInSubClass` and `OtherClass#testIncluded` are
executed. I would expect `testInSuperClass` to be executed too.
A test reproducing this can be found here:
https://github.com/pdolif/maven-surefire/commit/99e5a36fe4ff2633cad603fefa82671cfe89c60b.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]