Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
578 views
in Technique[技术] by (71.8m points)

testng - Can't run all classes in parallel using maven

Having such testng.xml file:

<suite name = "Suite">
    <test name = "PositiveTests">
        <classes>
            <class name = "tests.Positive.ActionsOnFileTest"></class>
            <class name = "tests.Positive.ActionsOnFolderTest"></class>
        </classes>
    </test>
    <test name = "NegativeTests">
        <classes>
            <class name = "tests.Negative.ActionsOnFileNegativeTest"></class>
        </classes>
    </test>
</suite>

I'm trying to run all 3 classes in parallel using such configuration in pom:

 <parallel>classes</parallel>
 <threadCount>3</threadCount>

But always first two classes that are part of PositiveTests run in 2 threads in parallel, tests.Negative.ActionsOnFileNegativeTest class runs only following them (so , it doesn't run in 3rd thread in parallel). It works only if I include this third class into PositiveTests. How can I achieve parallel running of all classes located in different tests names?

question from:https://stackoverflow.com/questions/65672023/cant-run-all-classes-in-parallel-using-maven

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...