How to force TestNG create new instance of test class for each method if run mode is parallel=“methods”

前端 未结 3 630
暖寄归人
暖寄归人 2021-01-01 19:26

How to force TestNG create new instance of test class for each method if run mode is parallel=\"methods\"?

JUnit does it automatically but TestNG reuses

3条回答
  •  醉酒成梦
    2021-01-01 20:05

    I've used TestNG to run multiple selenium webdriver tests in parallel. To set up a new WebDriver for each method, use the @DataProvider annotation and its associated attribute in the @Test annotation.

提交回复
热议问题