user2215220
user2215220

Reputation: 29

Jenkins pipeline script nunit cosole to publish junit report

In jenkins we are using Pipeline Script which has huge code. In that a bit code which I am trying to generate junit report and to publish it in jenkins.
I using first time trying to publish a junit report in jenkins. Not sure what are the things I need to show my report in jenkins.
When I click on CONFIGURE->PIPELINE tab I have only pipeline script and there is no option to add any build steps here. My project is not free pipeline but there is a pipeline Syntax and I can add a Junit Publish Junit test result report.Once I clicked generate pipeline script I see / junit '.*Report'/
I want to add this to my unit console command to show junit report in jenkins.

Q1) What I am missing to show junit report in jenkins?
Q2) Is it mandatory to add Junit plugin in Pipeline tab to show report in jenkins--But I don't see those options in my jenkins & limitations to my current project.

stage('RUN UTEST')
bat""" cd project//Types//NUnit.Runners2.6.4//Commands 
nunit-console..//Tests/bin//Unit.dll /include:Unit /xml=Report.xml;[transform=nunit3-junit.xslt]

Upvotes: 0

Views: 988

Answers (1)

hakamairi
hakamairi

Reputation: 4678

You need to call junit in your pipeline

stage('RUN UTEST')
bat""" cd project//Types//NUnit.Runners2.6.4//Commands 
nunit-console..//Tests/bin//Unit.dll /include:Unit /xml=Report.xml;[transform=nunit3-junit.xslt]
"""
junit '**/Report.xml'

Upvotes: 0

Related Questions