testng-annotation-test

TestNG - Order of Tests execution in selenium script

寵の児 提交于 2021-02-08 08:22:20
问题 I'm using selenium 3.8.1 and TestNG 6.9.2 version,while test execution before completing the @Test method another @Test method is starts,because of this i'm getting error in selenium script After completion of Test Cases execution. One Class public class LoginPage{ @Test(priority=0) public void test1(){ System.out.println(first test); } @Test(priority=1) public void test2(){ System.out.println(Second test); } } Second Class public class HomePage{ @Test(priority=0) public void test3(){ System

TestNG - Order of Tests execution in selenium script

亡梦爱人 提交于 2021-02-08 08:21:42
问题 I'm using selenium 3.8.1 and TestNG 6.9.2 version,while test execution before completing the @Test method another @Test method is starts,because of this i'm getting error in selenium script After completion of Test Cases execution. One Class public class LoginPage{ @Test(priority=0) public void test1(){ System.out.println(first test); } @Test(priority=1) public void test2(){ System.out.println(Second test); } } Second Class public class HomePage{ @Test(priority=0) public void test3(){ System

Cucumber tags as TestNG group in QAF and Spring boot environment

时光总嘲笑我的痴心妄想 提交于 2021-01-28 08:58:21
问题 I have 4 tests in a feature file with 2 different tags @first and @then. I would like @first tests to run first with parallelism and @then tests to run after all @first tests finished, with parallelism too. The project is here : https://github.com/marcesso/qafTesting @CucumberOptions(plugin = {"com.qmetry.qaf.automation.cucumber.QAFCucumberPlugin", "pretty", "html:target"}, /*tags = {"@Ignore"},*/ features = {"src/test/resources/my/custom/packagename/testing"}) public class RunnerTest extends

How to make dynamic parallel tests in testNG

倾然丶 夕夏残阳落幕 提交于 2020-08-26 07:03:11
问题 I am running parallel tests using testNG and inside of my testNg java file I have this code: public class OfficialTest { @Test public void run1() throws MalformedURLException{ new Controller(1); } @Test public void run2() throws MalformedURLException{ new Controller(2); } @Test public void run3() throws MalformedURLException{ new Controller(3); } @Test public void run4() throws MalformedURLException{ new Controller(4); } @AfterMethod public void close() { System.out.println("closing"); } } so

How to make dynamic parallel tests in testNG

心不动则不痛 提交于 2020-08-26 07:02:52
问题 I am running parallel tests using testNG and inside of my testNg java file I have this code: public class OfficialTest { @Test public void run1() throws MalformedURLException{ new Controller(1); } @Test public void run2() throws MalformedURLException{ new Controller(2); } @Test public void run3() throws MalformedURLException{ new Controller(3); } @Test public void run4() throws MalformedURLException{ new Controller(4); } @AfterMethod public void close() { System.out.println("closing"); } } so