-
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.
After methods should be skipped when exclusion used
Closes #1574 Suppose there are one or more configuration methods which don’t belong to any group and for which “alwaysRun” attribute is not set, and when the user specifies a valid exclusion list for groups, TestNG would still execute those configuration methods. Fixed this anomaly.
- Loading branch information
1 parent
317a92d
commit 0048a83
Showing
4 changed files
with
61 additions
and
1 deletion.
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
43 changes: 43 additions & 0 deletions
43
src/test/java/test/groupinvocation/Issue1574TestclassSample.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,43 @@ | ||
package test.groupinvocation; | ||
|
||
import org.testng.annotations.AfterMethod; | ||
import org.testng.annotations.AfterSuite; | ||
import org.testng.annotations.AfterTest; | ||
import org.testng.annotations.BeforeMethod; | ||
import org.testng.annotations.BeforeSuite; | ||
import org.testng.annotations.BeforeTest; | ||
import org.testng.annotations.Test; | ||
|
||
public class Issue1574TestclassSample { | ||
@BeforeSuite | ||
public void setupSuite() { | ||
} | ||
|
||
@BeforeTest | ||
public void setUpTest() { | ||
} | ||
|
||
@BeforeMethod | ||
public void setUpMethod() { | ||
} | ||
|
||
@AfterMethod | ||
public void tearDownMethod() { | ||
} | ||
|
||
@AfterTest | ||
public void tearDownTest() { | ||
} | ||
|
||
@AfterSuite(alwaysRun = true) | ||
public void tearDownSuite() { | ||
} | ||
|
||
@Test(groups = {"sometest"}) | ||
public void someTest() { | ||
} | ||
|
||
@Test(groups = {"anothertest"}) | ||
public void anothertest() { | ||
} | ||
} |