Skip to content
New issue

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

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

Already on GitHub? # to your account

Add support for test results in .TRX format #424

Closed
1 of 3 tasks
baev opened this issue Jun 26, 2017 · 14 comments
Closed
1 of 3 tasks

Add support for test results in .TRX format #424

baev opened this issue Jun 26, 2017 · 14 comments
Assignees
Labels
type:new feature Change that add something new for end users

Comments

@baev
Copy link
Member

baev commented Jun 26, 2017

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Currently you can not build the report from TRX test results.

What is the expected behavior?

An ability to build Allure report from TRX files

What is the motivation / use case for changing the behavior?

Test results file created by Visual Studio, a Microsoft application used to develop Windows software; contains test results stored in an XML format; used to display test results in Visual Studio as well as save historical test case results.

There are a lot of Visual Studio users, so it would be nice to provide an ability to generate Allure report for them out of the box

Other information

Sample TRX file https://gist.github.com/baev/a815edbb988bf94336dc26a49613feca

@baev baev added type:new feature Change that add something new for end users from:contributor labels Jun 26, 2017
@baev baev self-assigned this Jul 2, 2017
@baev baev closed this as completed in 9d79a80 Jul 2, 2017
@baev baev removed the review label Jul 2, 2017
@arpit-nagar
Copy link

Can you please let me know.. How to configure it in Jenkins.
I have a test with generate .trx output.
What are the next steps I follow to get Allure report.

Thanks
Arpit

@baev
Copy link
Member Author

baev commented Aug 8, 2017

You need to install latest Allure Jenkins plugin, and configure it to generate a report from the folder, that contains trx files

@arpit-nagar
Copy link

I need help... how to generate report...

I used below settings
allure

Jenkins output log.

Unpacking https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.3/allure-2.3.zip to /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure on Jenkins

[test-project] $ /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure/bin/allure generate -o /var/lib/jenkins/workspace/test-project/allure-report

allure-results does not exists

send analytics

Report successfully generated to /var/lib/jenkins/workspace/test-project/allure-report
Allure report was successfully generated.

Allure report is empty with 0 suite

Can you please help ?

@eroshenkoam
Copy link
Member

eroshenkoam commented Aug 8, 2017

Hi @arpit-nagar
In your case result path should be just testReport (without TestResults.trx).
You need to point on directory with trx files.

@arpit-nagar
Copy link

Thanks it worked...
My folder name was testReports
I changed it to testReports/*.trx and it worked.
Thanks a lot for your immediate support.

@eroshenkoam
Copy link
Member

@arpit-nagar testReports is enough (without any suffix)

@arpit-nagar
Copy link

arpit-nagar commented Aug 8, 2017

@eroshenkoam Thanks for information.
Just have one query/issue.
On test failure - Allure report do not have any stackTrace with failure entry(reason of failure - errorInfo) while my trx file has this info.
Am I missing anything ??

@baev
Copy link
Member Author

baev commented Aug 8, 2017

@arpit-nagar it is not parsed yet. You can create an issue

@arpit-nagar
Copy link

Yeah I will create.
Thanks for your quick response.
Very nice product and community.

@premaram
Copy link

premaram commented Feb 13, 2018

I am trying to generate allure reports for the VsTest results which are in .TRX format.
I tried the command $C:\allure-command-line\allure generate <TRX folder> -c -o <Allure-report-Path>

It says report generated successfully with 1 KB size index.html and it is just blank. No allure_log generated as well. Appreciate your help!!
@arpit-nagar @eroshenkoam

@baev
Copy link
Member Author

baev commented Feb 14, 2018

@premaram try $ C:\allure-command-line\allure serve <TRX folder> instead

@premaram
Copy link

@baev Awesome! Serve command works. Thank you so much.
But, from Jenkins, Allure2.5 report uses generate command by default. Is it possible to change that?

@baev
Copy link
Member Author

baev commented Feb 14, 2018

Allure2.5 report uses generate command by default. Is it possible to change that?

serve command is shortcut for generate & open. Allure uses AJAX to load report data, so you can't view the report without starting web server (what open command did) due to security issues. Using Jenkins there is no need to serve the report, Jenkins serves it for you

@premaram
Copy link

premaram commented Feb 14, 2018

Thanks @baev

I see the report in Allurereport link in Jenkins. But I always get this below exception
though it says successfully generated the report and hence Job always fails

$ C:\allure-commandline\bin\allure.bat generate C:\Jenkins\workspace\Test_QA\TestOutput C:\Jenkins\workspace\Test_QA\TestOutput\history -c -o C:\Jenkins\workspace\Test_QA\allure-report
Report successfully generated to C:\Jenkins\workspace\Test_QA\allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
ERROR: Build step failed with exception
java.lang.NullPointerException
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:308)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:223)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:676)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:621)
at hudson.model.Run.execute(Run.java:1760)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:405)
Build step 'Allure Report' marked build as failure
Collecting metadata...
Metadata collection done.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type:new feature Change that add something new for end users
Projects
None yet
Development

No branches or pull requests

4 participants