0
votes

I am trying to integrate donut type report using specflow and NUnit2.64(I have tried with Nunit3 as well) using Jenkins. Has anyone tried that I google it but can't find much detail?

I have done the following configuration in my Jenkins.

MSBuild Version : MSBuild
MSBuild Build File: Myproject.sln

Execute Windows batch command

Command: D:\myprojectPath\bin\nunit3-console D:\projectPath\bin\Debug\RESTAPITest.dll --result=TestResult.xml

D:\Reports\specflow.exe nunitexecution report D:\myProjectPath\projName.csproj /out:MyTestResults.html

Publish Nunit test result report

Test report XMLs: TestResult.xml

The report I am getting is like this. But my TestResult.xml shows all the steps of scenario. Don't know what I am missing and I wanted to show reports in donut kind of form.

enter image description here

2
Which SpecFlow version are you using? Be aware, that SpecFlow has not yet full support for the NUnit3 test result output.Andreas Willich

2 Answers

1
votes

You need to output the report in the correct format when using NUnit3 (see Specflow documentation) as Specflow doesn't support NUnit3 fully at the moment.

0
votes

You can also consider using allure. I have integrated allure onto our specflow projects which creates pretty good reports.

Checkout this useful post which will explain you on how to configure your jenkins with allure. Basic idea is to still run your tests using VSTEst and using the trx file that is generated, you could create allure reports by pointing to the TestResults/*.trx path. https://github.com/allure-framework/allure2/issues/424