Mallikarjunarao Kosuri
Mallikarjunarao Kosuri

Reputation: 1111

Jenkins rest api for junit result upload to specific job

I have been trying to POST Junit output.xml to a specific testReort job it returns Not found error.

I have tried all combination methods described below, but no success.

  1. Does Jenkins supports POST/PUT operation to upload testReport to specific job?
  2. If not how do i do this task?

curl --silent --show-error --netrc --header 'Content-Type: application/xml' -X POST --data-binary @/home/test/Desktop/output.xml http://username:[email protected]:8080/job/xx/job/xx_test/job/mytest/1/testReport/

curl --silent --show-error --netrc --header 'Content-Type: application/xml' -X PUT --data-binary @/home/test/Desktop/output.xml http://username:[email protected]:8080/job/xx/job/xx_test/job/mytest/1/testReport/

curl --silent --show-error --netrc --header 'Content-Type: application/xml' -X POST --data-binary @/home/test/Desktop/output.xml --user username:password http://test.com:8080/job/xx/job/xx_test/job/mytest/1/testReport/

Thank you very much, your support much appreciated.

Upvotes: 1

Views: 1126

Answers (1)

Christopher Orr
Christopher Orr

Reputation: 111575

No, you can't alter the test results after a build has been completed. There is no API for this.

You should use the JUnit plugin during a build to process the results of JUnit XML files that you have.

Upvotes: 1

Related Questions