How can I send testproject junit.xml report to qTest via pipeline job

Hello TestProject Team,
I have a requirement of integrating my pipeline job test result report to qTest.
As of now , at the end of the test , I am just querying TestProject API to fetch latest result in response and fetching some variables like result status , pass /fail count , agent Name etc.
Refer :

withCredentials([string(credentialsId: ‘TP_API’, variable: ‘TP_API_KEY’),string(credentialsId: ‘PROJECT_ID’, variable: ‘PROJECT_ID’),string(credentialsId: ‘JOB_ID_BEFORE_RELEASE’, variable: ‘JOB_ID’)]) {
def url = “${tp_base_url}v2/projects/${PROJECT_ID}/jobs/${JOB_ID}/reports/latest?details=false&format=TestProject”
def res = httpRequest httpMode: ‘GET’, acceptType: ‘APPLICATION_JSON’,contentType: ‘APPLICATION_JSON’, url: “${url}”, customHeaders: [[maskValue: false, name: ‘Authorization’, value: “${TP_API_KEY}”]]
def resBody = readJSON text: res.content
echo “Fetching latest report details : \n ${resBody}”

Now after this I need to send this report to qTest , using qTest jenkins plugin.

I know testproject generates report but it is not getting stored in my repository. Also I dont know where is getting stored on Jenkins. So I am not able to give this path , to fetch results from

Please help me to find solution as how to have these testproject result reports uploaded on qTest.

Hi @puniti.chauhan,
The best method is to use the integration between qTest to TestProject and then using the qTest reports that are being generating automatically after running TestProject jobs.

If for some reason you require TestProject reports specifically, you will need to query TestProject API.

  1. GET Job execution latest report (make sure to choose JUnit) TestProject API v2
  2. PUT the response in qTest endpoint
  3. Optionally validate that the report was uploaded to qTest

Feel free to let me know if you have additional questions.

Hello Amit,
Thanks for replying to my mail. I understand that best way is to use qTest and Testproject integration , but for some reason I dont get that option in my qTest version [ subscribed by our company ] .
Hence I have to write that integration part in pipeline groovy script.

First point is understood. In second point can you tell me , from where can I get this qTest endpoint and authentication token for same?

Looking forward to your reply.

Hi @puniti.chauhan,
For specific endpoints in qTest please contact qTest support or documentation.
The option to enable the integration, can be found on TestProject side on the integration section,
Even if it’s not available on qTest.
Let me know if you were able to enable it.

On TestProject integrations, it asks for bearer token . From where can I find it?
Please check the screenshots in attachment.

Hi @puniti.chauhan,
Follow this guide:

If that doesn’t work please contact your qTest administrator.