Closed dagansandler closed 4 years ago
We're also able to reproduce this issue using version 7.1.0 across all our teams and various testing projects. Nobody has reported any such issues running with 6.14.3.
As dagansandler describes in his example code this can be reproduced by simply copying his example test class into a maven project then run $ mvn test -Dgroups=A
.
This is a duplicate of https://github.com/cbeust/testng/issues/2209
Please follow/comment on the original issue to track this.
When setting an included group on test or suite level, configuration methods are running multiple times instead of just once.
TestNG Version
7.1.0
Expected behavior
Output:
and before/after invocation methods in listener should only be called 9 times each
Actual behavior
Output:
and before/after invocation methods in listener are called 25(!) times
Is the issue reproductible on runner?
The issue is reproducible when using the TestNG APIs to construct a xml suite programatically.
Test case sample
Test class:
Main class: