开发者

How to reduce the time in executing Selenium test cases?

开发者 https://www.devze.com 2023-04-07 04:20 出处:网络
I\'m writing the Selenium test cases for each screen to test the different scenarios. In our project for each build in Jenkins, its Selenium test cases (QA) also runs automatically.

I'm writing the Selenium test cases for each screen to test the different scenarios. In our project for each build in Jenkins, its Selenium test cases (QA) also runs automatically.

My problem is even though it's automate开发者_JAVA技巧d, it's taking a lot of time to run. I have 380 test cases and it's taking 20-25 minutes. How can I reduce the time? Are there any other ways or techniques to follow?


you can check for the Selenium grid option, which will help you to run the tests in parallel. http://selenium-grid.seleniumhq.org/


In the 380 testcases you have , check if all the testcases are really required . If all the testcases are required , check if u are having any repeated validations and see if you can remove any one of them .

If you are using wait time in your testcases , see if you can reduce the wait times with out affecting the output of the testcases .

The best thing would be to split them in to seperate groups and run them in different machines using Grid . Or use TestNg/JUnit to run the testCases parallely .

In TestNg , in the testng.xml file , u can use the following to run them in parallel

<suite name="ParallelTests" verbose="5" parallel="methods" thread-count="10">

0

精彩评论

暂无评论...
验证码 换一张
取 消