maven - Run testng methods across different tests in parallel -
i have more 1 test tags in testng.xml
file running using maven. have set parallel attribute @ suite level methods , thread-count 5. problem facing tests executed sequentially , methods inside test cases executed in parallel. more clear, though there unused threads(selenium nodes in grid in case) available subsequent tests waits till methods in previous test executed.
here testng.xml have used,
<suite name="suite1" verbose="1" parallel="methods" thread-count="5" preserve-order="false"> <test name="login" > <classes> <class name="testsuite.testset1" /> </classes> </test> <test name="product search"> <classes> <class name="testsuite.testset2"/> </classes> </test> </suite>
as have more 10 nodes available in selenium grid, behavior increases execution time considerably , defeats purpose of having grid architecture. please let me know if there's way using can execute test methods across suite in parallel. sure missing silly, please me point that?
<suite name="suite1" verbose="1" parallel="tests" thread-count="2" preserve-order="false"> <test name="login" parallel="methods" thread-count="5"> <classes> <class name="testsuite.testset1" /> </classes> </test> <test name="product search" parallel="methods" thread-count="5"> <classes> <class name="testsuite.testset2"/> </classes> </test>
first allow suite run "tests" in parallel number of test suites run @ time (example 2).
second allow test run "methods" parallel number of methods each can run (example 5 in each).
if bumping against thread limit careful when adjusting these numbers. example if add test group thread-count of 5 , change suite thread-count 3. you'll @ 15 threads.
Comments
Post a Comment