Running the following TestNG xml suite:
<suite name="MySuite" verbose="1" configfailurepolicy="continue" >
<test name="some-tests" parallel="classes" thread-count="5">
<groups>
<run>
<include name="tmp" />
...
with test class
@Slf4j
public class TmpTest {
@Test(groups = "tmp")
void test1()
{
log.debug("test1");
}
@Test(groups = "tmp", dependsOnMethods = "test1")
void test2()
{
log.debug("test2");
}
}
Should results with single thread as both tests are in the same class
Apparently there are 2 threads:
15:35:59.353 [TestNG-test=some-tests-1] DEBUG TmpTest - test1
15:35:59.362 [TestNG-test=some-tests-2] DEBUG TmpTest - test2
这是开放的TestNG问题, 网址为https://github.com/cbeust/testng/issues/1185 parallel =“ classes ”, dependsOnMethods无法按预期工作
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.