Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
581 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 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...