testng-team / testng-eclipse

Eclipse plug-in for TestNG
https://testng.org
193 stars 164 forks source link

TestNG 7.0.0 plugin is showing up two times the same test case execution #474

Open r4f431007 opened 4 years ago

r4f431007 commented 4 years ago

Any relate message in "Error Log" view

As you guys can see, Chrome browser is executing the test case two times, I've tried with 10 test cases and it's happening the same, duplicating the same timing execution for all test cases (just first browser).

This had never happened on 6.14.3, since I changed to 7.0.0 it's happening.

image

The Dependency Management tool for your project

Operating System

r4f431007 commented 4 years ago

This is my XML file.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Books Tests" parallel="tests">
    <test name="Chrome Test">
        <parameter name="browser" value="chrome" />
        <groups>
            <run>
                <include name="EULA" />
            </run>
        </groups>
        <classes>
            <class name="JavaTest" />
        </classes>
    </test>
    <test name="Firefox Test">
        <parameter name="browser" value="firefox" />
        <groups>
            <run>
                <include name="Books" />
            </run>
        </groups>
        <classes>
            <class name="JavaTest" />
        </classes>
    </test>
</suite>
githubaja commented 4 years ago

I'm having the same issue. testng.xml ran from Eclipse displayes @Test method twice. If you need any data in particular (pom, testng.xml...) just let me know.

githubaja commented 4 years ago

Update: it's not just duplicating the tests. If i have, say, 4 tags in testng.xml, then TestNG plugin will show test methods 4 times in the first test. 3 times for the second test, 2 times for the third test, and the fourth test will be displayed properly.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite verbose="2" name="Suite">
    <!-- <test thread-count="5" name="Test"> -->
    <test name="Login tests">
        <classes>
            <class name="testng.Login" />
        </classes>
    </test>
    <test name="Smoke test">
        <classes>
            <class name="testng.Smoke" />
        </classes>
    </test>
    <test name="Document search test">
        <classes>
            <class name="testng.DocumentsSearch" />
        </classes>
    </test>
    <test name="Production order search test">
        <classes>
            <class name="testng.POSearch" />
        </classes>
    </test>
</suite>

This will result in test methods in Login class to be displayed 4 times, 3 times for methods in Smoke, 2 times for methods in DocumentsSearch and POSearch will be displayed correctly.