Share with your friends









Submit

TestNG provides an ability to run test classes in parallel. In parallel testing, we test different modules or applications on multiple browsers in parallel rather than one by one. Let’s get started Step 1 This blog post will address the issue of slow test runs when using Cucumber JVM with web automation tools such as WebDriver to perform acceptance testing on a web application.. On the other hand, TestNG allows you to create multiple test cases simultaneously, and that is where … Creating Feature file, Step Definition class, Test Runner class and executing the test case using TestNG. In a scenario where we have two versions of software available, and we need to check its stability and compatibility, we can run the two versions simultaneously and find issues at a much faster rate. By using parallel execution of classes, each class will be started and executed simultaneously in different threads. or we can pass browser name as parameter to execute on specific device. Note : We are extending “AbstractTestNGCucumberTests” which makes this a testNG class and you can use all the testNG annotations here. the given directory -->, , , , , , , , , , "target/parallel/features/[CUCABLE:FEATURE].feature", "json:target/cucumber-report/[CUCABLE:RUNNER].json", How to add screenshots in Automation test…, How to merge your parallel test cucumber…, How to turn your default cucumber reporting…. This method also has a dataprovider annotation. Like we can pass user name and password through testng.xml instead of hard coding it in testmethods. It helps in reducing test time almost by 60-80%. Using Junit convert those scenarios into Java code methods. For example, if you have 5 Feature files, then at the time 5 instances of the browsers will be opened and 5 Scenarios will be executed in parallel. @Parameters({“param1, “param2”, Param3”}). Good news, Cucumber offers us an excellent solution for executing the tests in parallel. #automation #testing #cucumber #selenium #cucable #paralleltesting, , , , , ,