Repository navigation
After methods should be skipped when exclusion used - #1575
krmahadevan wants to merge 1 commit into
Conversation
de2936f to
d472bc9
Compare
| } | ||
|
|
||
| private static boolean isExcluded(Collection<String> excludedGroups, String... groups) { | ||
| boolean noGroups = (groups == null || groups.length == 0); |
| test.addExcludedGroup("sometest"); | ||
| TestNG testng = create(suite); | ||
| testng.run(); | ||
| assertThat(Issue1574TestclassSample.messages).containsExactly("anothertest","@AfterSuite"); |
| import java.util.List; | ||
|
|
||
| public class Issue1574TestclassSample { | ||
| public static List<String> messages = Lists.newArrayList(); |
There was a problem hiding this comment.
Prefer to use InvokedMethodNameListener when possible.
d472bc9 to
afc8a1b
Compare
|
@juherr - I have amended the commit and fixed all the comments. Please help take a look |
|
ping @juherr - Gentle reminder.. |
juherr
left a comment
There was a problem hiding this comment.
The code is ok but I think it doesn't solve any issue.
@cbeust Could you check #1574 (comment)
| } | ||
|
|
||
| private static boolean isExcluded(Collection<String> excludedGroups, String... groups) { | ||
| if (!excludedGroups.isEmpty() && groups.length ==0) { |
afc8a1b to
ffe1505
Compare
|
ping @cbeust - Can you please help comment on this here : #1574 (comment) I would like to either close this PR if its not a bug or get this merged if its a bug. Please advise. |
ffe1505 to
0048a83
Compare
Closes testng-team#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.
0048a83 to
324bb80
Compare
|
Closing this PR since #1574 has now been closed as not planned. The proposed change would alter the established group-exclusion semantics by excluding ungrouped methods whenever an exclusion is present. Configuration methods that must run regardless of group filtering should use |
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.
Fixes #1574 .
Did you remember to?
CHANGES.txtWe encourage pull requests that:
If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.