I am using Jira (Zephyr) rest calls to create Test Cycle and add Tests cases into it. According to information mentioned here if I use this rest call to add tests to Cycle then as a response I will get JobProgressToken. JobProgressToken is nothing but will tell the progress of Test Case addition in Test Cycle.
The JobProgressToken looks like:
{
"jobProgressToken": "0001491864384175-f6f74daa3cce-0001"
}
Now the problem which I am facing is I am not getting any output from this JobProgressToken. I tried firing the GET rest call using the format mentioned but I am getting empty response.
Can somebody please explain how to use this JobProgressToken to get the Progress of my task? I want to verify that the tests which I added to Cycle are added susccessfully or not?
Hi Akash
Thanks for your interest in Zephyr.
In general if we get a job progressId and a response 200 it means the API call is done and that is the success response
The practical case to use this token is in the "Get job Progress Status" API
You will get the response as attached in screenshot and by reading the Json response "message" you can confirm if all the tests are added to cycle.
Thanks
ZephyrSupport
Hello Zephyr Support,
I am trying to create a new cycle based on another cycle with a cloneCycleId. This has worked previously and the new cycle Id is returned in JSON field "id".
Currently, I am getting this "jobProgressToken", how do I extract the new test cycle id field?
From the documentation, it seems I might have to execute http get: ".../rest/zapi/latest/execution/jobProgress/:jobProgressToken?type=XXXXXXX" to get information, I cannot find what I need to pass for the type parameter??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Our whole automated test is based on the id being returned by cloning. Now that you changed stuff without informing us How can we move forward??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Francis,
We figured out a workaround with regards to this issue. We were also relying on the "id" field and this change broke our entire process.
To circumvent this issue, we simply make a webservice call to retrieve all the jobs and put them into a list and then we filter it based on name.
This is the call: "domain/rest/zapi/latest/cycle?projectId=XXXXXXX". From the response that you get, grab the "name" field and check for the name you are looking for and then save the id accordingly (see code below for more details)
getReq = new HttpGet (domain + "/rest/zapi/latest/cycle?projectId=" + projectId); response = httpClient.execute(getReq, localContext); jsonObj = readJSON(new InputStreamReader(response.getEntity().getContent())); jsonObj = jsonObj.getJSONArray(versionId).getJSONObject(0); jsonObj.remove("recordsCount"); Iterator<?> j = jsonObj.keys(); while(j.hasNext()) { String key = (String) j.next(); if(jsonObj.getJSONObject(key).getString("name").contains(cloneName)) { clonedId = key; logger.info("Cloned Template ID obtained from brute force look up."); break; } }
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.