You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 14, 2019. It is now read-only.
Hello i have an issue for getting the reports where i am using giving parameters in testng.xml to run the same test class twice for different devices. everything is going fine but in the report all the test cases are showing twice for each device.
my testng.xml file is as follows
Hello. IMO it is expected behavior. Report shows as many test cases as many executions there were. It doesn't matter whether the test was parametrized or not. So, if test passed on one device and failed on another one, there will be two test cases with according statuses. For test name you can't use placeholders (as for test steps https://github.com/allure-framework/allure-core/wiki/Steps#placeholders ). But test name should be extended with parameters values automatically.
Thank you for your reply , I will tell the whole scenario . I am using Appium with help of selenium grid and I am giving device parameters in testng.xml the screenshot I attached is only one test case running in both the devices. But it's showing same test cases many number of times.
@fropcorn-ravi could you please provide testng.xml once more?
Usually duplicated test cases mean duplicated executions (e.g. several Allure adapters in class path, not cleaned project from previous execution, etc.). You can have a look how many tests Allure knows about right after execution (but before report generation). Please look through target/allure-results/*-testsuite.xml files.
i have checked the xml generated by allure report. test cases were showing twice for each device, i have attached the pom xml in the attachement , could you please check and tell where i have done a mistake. pom.txt
and please find the test allure report generated xml to txt files for both devices device (1).txt device (3).txt
I have the same situation as @fropcorn-ravi. In my pom.xml i defined suiteXmlFile in which i defined java class with method marked with @factory annotation. Every time i invoke
mvn clean test
from command line it show me that 3 tests were performed but in report(mvn site) i see twice as much.
<!--only for 1.3.* TestNG adapters. Since 1.4.0.RC4, the listener adds via ServiceLoader-->
<properties>
<property>
<name>listener</name>
<value>ru.yandex.qatools.allure.testng.AllureTestListener</value>
</property>
</properties>
Since you are using TestNG version 1.4.* you don't need these properties in the pom anymore. Looks like listener adds twice in that case and that's why tests are showing twice in report.
So, report shows correctly after deleting that piece of code from pom.xml.
angusiasty, jaytradertee, jpettyc, vietch2612, junejan143 and 1 more
listener
ru.yandex.qatools.allure.testng.AllureTestListener
Since you are using TestNG version 1.4.\* you don't need these properties in the pom anymore. Looks like listener adds twice in that case and that's why tests are showing twice in report.
So, report shows correctly after deleting that piece of code from pom.xml.
—
Reply to this email directly or view it on GitHub.
Hi @fropcorn-ravi : How were you able to insert the details of the devices in the report i.e: Nexus, version etc. Also, for me the second device execution is shown as a retry, is this working fine for you
Activity
volkovs commentedon Jan 11, 2016
Hello. IMO it is expected behavior. Report shows as many test cases as many executions there were. It doesn't matter whether the test was parametrized or not. So, if test passed on one device and failed on another one, there will be two test cases with according statuses. For test name you can't use placeholders (as for test steps https://github.com/allure-framework/allure-core/wiki/Steps#placeholders ). But test name should be extended with parameters values automatically.
fropcorn-ravi commentedon Jan 11, 2016
Thank you for your reply , I will tell the whole scenario . I am using Appium with help of selenium grid and I am giving device parameters in testng.xml the screenshot I attached is only one test case running in both the devices. But it's showing same test cases many number of times.
volkovs commentedon Jan 11, 2016
@fropcorn-ravi could you please provide testng.xml once more?
Usually duplicated test cases mean duplicated executions (e.g. several Allure adapters in class path, not cleaned project from previous execution, etc.). You can have a look how many tests Allure knows about right after execution (but before report generation). Please look through target/allure-results/*-testsuite.xml files.
fropcorn-ravi commentedon Jan 12, 2016
fropcorn-ravi commentedon Jan 13, 2016
i have checked the xml generated by allure report. test cases were showing twice for each device, i have attached the pom xml in the attachement , could you please check and tell where i have done a mistake.
pom.txt
and please find the test allure report generated xml to txt files for both devices
device (1).txt
device (3).txt
modnarlp commentedon Jan 19, 2016
Hello.
I have the same situation as @fropcorn-ravi. In my pom.xml i defined suiteXmlFile in which i defined java class with method marked with @factory annotation. Every time i invoke
mvn clean test
from command line it show me that 3 tests were performed but in report(mvn site) i see twice as much.
FactoryClass.txt
runner.txt
pom.txt
yulia-nechaeva commentedon Jan 21, 2016
Hey guys, look at these lines in your pom.xml:
Since you are using TestNG version 1.4.* you don't need these properties in the pom anymore. Looks like listener adds twice in that case and that's why tests are showing twice in report.
So, report shows correctly after deleting that piece of code from pom.xml.
modnarlp commentedon Jan 22, 2016
Hello, thanks a lot for your answer. You are absolutely right with that additional AllureTestListener in pom.xml cause the problem.
baev commentedon Jan 22, 2016
@yulia-nechaeva 👍
http://stackoverflow.com/questions/25161075/allure-framework-testng-adapter-generates-duplicate-xml-files
fropcorn-ravi commentedon Jan 22, 2016
Thanks a lot , you were right....
Ravi Kiran
Software Development Engineer in Test
Fropcorn
fdPoornima commentedon Oct 18, 2017
Hi @fropcorn-ravi : How were you able to insert the details of the devices in the report i.e: Nexus, version etc. Also, for me the second device execution is shown as a retry, is this working fine for you