Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 of 8 tasks
r4f431007 opened this issue Feb 11, 2020 · 3 comments
Open
3 of 8 tasks

Comments

@r4f431007
Copy link

r4f431007 commented Feb 11, 2020

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

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

Operating System

  • Windows
  • Linux
  • OSX
@r4f431007
Copy link
Author

r4f431007 commented Feb 11, 2020

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
Copy link

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
Copy link

githubaja commented Mar 18, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants