Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TestNG only running the first test in a suite

Tags:

java

testng

I have a testng.xml file with two tests:

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="XEP-0100" verbose="1">
    <test name="Registration">
        <classes>
            <class name="com.obscured.xmpp.TestRegister" />
        </classes>
    </test>
    <test name="Login">
        <classes>
            <class name="com.obscured.xmpp.TestLogin" />
        </classes>
    </test>
</suite>

Unfortunately, the Eclipse TestNG plugin is only running a single test when running against the testng.xml:

enter image description here

If I put the TestLogin class underneath the Registration test, it runs. Even more strange: the progress bar says "Tests 2/2"! What am I missing here?

like image 218
Jonathan Schneider Avatar asked Nov 04 '22 09:11

Jonathan Schneider


1 Answers

It looks like the plug-in actually ran both tests but is only reporting one and I see nothing wrong with what you posted. Can you create a small self-contained Eclipse project and email it to me? If I can reproduce this, I should be able to fix it quickly.

like image 124
Cedric Beust Avatar answered Nov 15 '22 13:11

Cedric Beust