-
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.
Include all data driven tests for reporting skips
Closes #2674 We now have a new configuration parameter named “-includeAllDataDrivenTestsWhenSkipping” which when used would cause a data driven test to report All its iterations as skipped when there is a failure in its upstream dependencies.
- Loading branch information
1 parent
4c28cd6
commit db17f3c
Showing
9 changed files
with
149 additions
and
7 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
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
12 changes: 12 additions & 0 deletions
12
testng-core/src/test/java/test/skip/issue2674/ConfigAwareTestNG.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.skip.issue2674; | ||
|
||
import org.testng.CommandLineArgs; | ||
import org.testng.TestNG; | ||
|
||
public class ConfigAwareTestNG extends TestNG { | ||
|
||
@Override | ||
public void configure(CommandLineArgs cla) { | ||
super.configure(cla); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
testng-core/src/test/java/test/skip/issue2674/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,22 @@ | ||
package test.skip.issue2674; | ||
|
||
import org.testng.Assert; | ||
import org.testng.annotations.DataProvider; | ||
import org.testng.annotations.Test; | ||
|
||
public class TestClassSample { | ||
@Test | ||
void test1() { | ||
Assert.fail(); | ||
} | ||
|
||
@Test( | ||
dataProvider = "items", | ||
dependsOnMethods = {"test1"}) | ||
void test2(String model, int variant) {} | ||
|
||
@DataProvider(name = "items") | ||
Object[][] items() { | ||
return new Object[][] {{"iPhone", 13}, {"iPhone-Pro", 12}}; | ||
} | ||
} |