testng-eclipse icon indicating copy to clipboard operation
testng-eclipse copied to clipboard

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

Open r4f431007 opened this issue 5 years ago • 3 comments

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

  • [x] Maven
  • [ ] Gradle
  • [ ] Ant
  • [ ] Eclipse Buildpath (aka. Use "TestNG Library" for your project in Eclipse)
  • [x] TestNG plugin

Operating System

  • [x] Windows
  • [ ] Linux
  • [ ] OSX

r4f431007 avatar Feb 11 '20 06:02 r4f431007

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>

r4f431007 avatar Feb 11 '20 06:02 r4f431007

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 avatar Mar 05 '20 10:03 githubaja

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.

githubaja avatar Mar 18 '20 12:03 githubaja