Parameterized Selenium Tests in Parallel with TestNG

前端 未结 2 568
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 13:34

First of all, sorry for my english, it\'s not so perfect :)

So I\'m facing with the following problem: I\'m trying to run parallel tests in different browsers using

2条回答
  •  粉色の甜心
    2020-12-09 14:25

    beforeTest() and afterTest() shouldn't be static if you want to run it in parallel, or make it synchronized to have it thread safe. Also, you do not use declared variable:

    public static BrowserSetup browser; 
    

    at all, or you missed something there since you also have:

    final BrowserSetup browser = new BrowserSetup(browserName, browserVersion, platform);
    

    inside beforeTest(...)

提交回复
热议问题