Ask a Question

Uploading junit4 automation results to Zephyr scale cloud (free version) failed

joezhou
New Contributor

Uploading junit4 automation results to Zephyr scale cloud (free version) failed

I installed Zephyr scale cloud (free version). The Jira project is ProjectA wth the key PROJ, and there is a test case test case7 with the key PROJ-T14. After the file zephyrscale_result.json was generated from JUnit4, the command below was issued, but the response was " {"errorCode":400,"message":"Couldn't find any mapped test cases","status":"Bad Request"}" 

 

curl -H "Authorization: Bearer token_value" -F "file=@zephyrscale_result.json;type=application/json" https://api.zephyrscale.smartbear.com/v2/automations/executions/custom?projectKey="PROJ"&autoCreateT...

 

zephyrscale_result.json content is as follows,

{
"version" : 1,
"executions" : [ {
"source" : "test_trial.SampleTest.testSample",
"result" : "Passed",
"testCase" : {
"key" : "PROJ-T14"
}
} ]
}

 

The image of test cases is uploaded with this email. Could anyone please shed some light on this issue?

 

Many thanks

2 REPLIES 2
MisterB
Community Hero

Hi Joe,

 

Unfortunately integrations with ZS isn't something I've had experience with yet but I did find this conversation and article that might help.

 

How attach files after an automated execution - SmartBear Community

 

JUnit Integration (custom) | Zephyr Scale Cloud Documentation (smartbear.com)

 

@josh42 has more experience with API usage and might be able to comment.

 

Sorry I can't be of more help on this occasion.

 

Good luck!

 

Andy

Hi,

 

I actually do not have that much experience with the ZS Cloud API and haven't used the JUnit integration yet.

 

Looking at the API docs, they talk about adding a zip file to the request. It seems like you are trying to send the json file directly, maybe that's something to look into? I wouldn't know, what the file needs to contain though (I'm guessing, just the json file, since afaik it's just used to bundle multiple results into one file).

 

Since you are using JUnit4, you could also try to send the results as an xml file.

https://support.smartbear.com/zephyr-scale-cloud/docs/test-automation/junit-integration-and-similar....

 

The docs seem to be a bit better on that approach.

 

Maybe you were already able to figure this out yourself. If so, let us know. 🙂

 

Cheers

Josh

cancel
Showing results for 
Search instead for 
Did you mean: