-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
167 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
testng-core/src/test/java/test/dependent/issue141/MultipleMatchesTestClassSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package test.dependent.issue141; | ||
|
||
import org.testng.Assert; | ||
import org.testng.annotations.Test; | ||
|
||
public class MultipleMatchesTestClassSample { | ||
|
||
@Test(dependsOnMethods = "test_C[0-9]{7}") | ||
public void randomTest() {} | ||
|
||
@Test | ||
public void test_C6390323() { | ||
Assert.fail(); | ||
} | ||
|
||
@Test | ||
public void test_C6390324() {} | ||
} |
25 changes: 25 additions & 0 deletions
25
testng-core/src/test/java/test/dependent/issue141/NestedTestClassSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package test.dependent.issue141; | ||
|
||
import org.testng.Assert; | ||
import org.testng.annotations.Test; | ||
|
||
public class NestedTestClassSample { | ||
|
||
public static class FirstSample { | ||
@Test(dependsOnMethods = "test_C[0-9]{7}") | ||
public void randomTest() {} | ||
|
||
@Test | ||
public void test_C6390323() {} | ||
} | ||
|
||
public static class SecondSample { | ||
@Test(dependsOnMethods = "test_C[0-9]{7}") | ||
public void randomTest() {} | ||
|
||
@Test | ||
public void test_C6390323() { | ||
Assert.fail(); | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
testng-core/src/test/java/test/dependent/issue141/SkipReasoner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package test.dependent.issue141; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
import org.testng.ITestListener; | ||
import org.testng.ITestNGMethod; | ||
import org.testng.ITestResult; | ||
|
||
public class SkipReasoner implements ITestListener { | ||
|
||
private List<String> upstreamFailures; | ||
|
||
@Override | ||
public void onTestSkipped(ITestResult result) { | ||
upstreamFailures = | ||
result.getSkipCausedBy().stream() | ||
.map(ITestNGMethod::getQualifiedName) | ||
.collect(Collectors.toList()); | ||
} | ||
|
||
public List<String> getUpstreamFailures() { | ||
return upstreamFailures; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
testng-core/src/test/java/test/dependent/issue141/TestClassSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package test.dependent.issue141; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
public class TestClassSample { | ||
|
||
@Test(dependsOnMethods = "test_C[0-9]{7}") | ||
public void randomTest() {} | ||
|
||
@Test | ||
public void test_C6390323() {} | ||
} |