Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

[ZAPI] Is it possible to get Test Step name from Execution?

Aleksandrs Kovalcuks February 4, 2014

Hi everyone, can you help me, I need to get all test steps (“id” and “name”) from Execution. Currently I can get “id” by sending GET request (/jira_server/rest/zapi/latest/stepResult). But I don’t know how I can get also test step “name”.

For example I have Execution with test steps (Bread , Milk , Meat ), so I executed test for milk , and I want to mark Milk test step with PASS. So to do that I have to send POST request (/jira_server/rest/zapi/latest/stepResult/{id}/quickExecute) with test step id. Now I need test step “id”, I can get that by sending GET request (/jira_server/rest/zapi/latest/stepResult), but here is my problem source, I don’t know witch id belongs to witch test step. So I decided to get also test step name to know which is witch. Can you help me with that?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Daniel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2014

Hi Aleksandrs,

The GET request /jira_server/rest/zapi/latest/stepResult is used to get the stepResult object of a test's execution step. This object does not include details on the step itself but only information on the execution of that step. However, with the information to get the stepResult and information in that object, we can retrieve information on the step itself.

Once you have the stepResult, you will need to leverage either the GET request /jira_server/rest/zapi/latest/teststep/{issueId}/ or /jira_server/rest/zapi/latest/teststep/{issueId}/{id} to get the information regarding the test step name. The first request needs the issueId and the second request requires the issueId and testStepId. The stepResult object includes the stepId, so in either case you will need the issueId to get the desired information.

You can see full details on these calls above by going to our interactive API reference site here:

http://docs.getzephyr.apiary.io/

Regards,

Daniel

0 votes
Asim Zaka February 10, 2014

Hi there,

Did you get this resolved? I am a new bee and cant send a simple execute command from my browser? Whats the correct format of doing it please?

TAGS
AUG Leaders

Atlassian Community Events