-
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
13 changed files
with
239 additions
and
3 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
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
8 changes: 8 additions & 0 deletions
8
testng-core/src/test/java/test/dependent/issue141/ASample.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,8 @@ | ||
package test.dependent.issue141; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
public class ASample { | ||
@Test(dependsOnMethods = "test.dependent.issue141.BSample.b*") | ||
public void a() {} | ||
} |
11 changes: 11 additions & 0 deletions
11
testng-core/src/test/java/test/dependent/issue141/BSample.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,11 @@ | ||
package test.dependent.issue141; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
public class BSample { | ||
@Test | ||
public void b() {} | ||
|
||
@Test | ||
public void bb() {} | ||
} |
15 changes: 15 additions & 0 deletions
15
testng-core/src/test/java/test/dependent/issue141/ErrorScenarioNestedSample.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,15 @@ | ||
package test.dependent.issue141; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
public class ErrorScenarioNestedSample { | ||
|
||
@Test( | ||
dependsOnMethods = "test.dependent.issue141.ErrorScenarioNestedSample$InnerTestClass.rambo*") | ||
public void a() {} | ||
|
||
public static class InnerTestClass { | ||
@Test | ||
public void b() {} | ||
} | ||
} |
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(); | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
testng-core/src/test/java/test/dependent/issue141/SimpleSample.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,9 @@ | ||
package test.dependent.issue141; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
public class SimpleSample { | ||
|
||
@Test(dependsOnMethods = "test.dependent.issue141.BSample.xx*") | ||
public void testMethod() {} | ||
} |
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::getMethodName) | ||
.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() {} | ||
} |
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