-
Notifications
You must be signed in to change notification settings - Fork 560
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Affected version
3.5.4
Bug description
Given the following three test classes:
SubClass:
import org.testng.annotations.Test;
public class SubClass extends SuperClass {
@Test
public void testInSubClass() {
System.out.println("TestNG: SubClass#testInSubClass executed");
}
}SuperClass:
import org.testng.annotations.Test;
public class SuperClass {
@Test
public void testInSuperClass() {
System.out.println("TestNG: SuperClass#testInSuperClass executed");
}
}OtherClass:
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: pdolif@99e5a36.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working