cancel
Showing results for 
Search instead for 
Did you mean: 

Add tests to cycle via API

SOLVED
apuna12
Occasional Contributor

Add tests to cycle via API

Hello all,

 

I am so sorry to bother you every day. Today I want to add a tests into a test cycle via API. I tried to use the following link

https://zfjcloud.docs.apiary.io/#reference/execution/get-execution/add-tests-to-cycle

 

I created a JWT for the endpoint, used the body which is included on the mentioned link, adjusted the values, but I am getting the error "method field is required.". 

 

If I saw correctly it is not included in the body.

 

Can you help me with this? As always I am including some screen shots.

 

Thanks for the tips,

Tibor

 

apuna12_0-1613641696805.pngapuna12_1-1613641731111.pngapuna12_2-1613641774905.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
BibekBehera
Staff

Re: Add tests to cycle via API

Hi @apuna12 

So we have to use 2 api to add test cases to cycle .

1.To generate the JOB progress token id

API https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/executions/add/cycle/cycleid

method - POST

response - We will get the job progress token id - for example - 0001608711762447-242ac112-0001-



2. Use the above job progress token id in the api

API - https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/jobprogress/ (https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/jobprogress/job) token id

Method - GET

https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/jobprogress/0001608711762447-242ac...


I tried at my end and it is working fine.

Attaching screenshot for your reference

View solution in original post

4 REPLIES 4
BibekBehera
Staff

Re: Add tests to cycle via API

Hello @apuna12 ,

 

Please use the cycleID in the URL itself where you are sending the request. I can see that you have copied the complete request as it is in the document. You need to provide the input data based on the IDs that you have in your Jira.

 

Regards,

Bibek

apuna12
Occasional Contributor

Re: Add tests to cycle via API

Hello @BibekBehera ,

 

as you can see in the image from Postman, I used it as you mentioned. It is defined as environment variable, thus it is used in the url(even for the JWT generator).

 

Thanks,

Tibor

BibekBehera
Staff

Re: Add tests to cycle via API

Hi @apuna12 

So we have to use 2 api to add test cases to cycle .

1.To generate the JOB progress token id

API https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/executions/add/cycle/cycleid

method - POST

response - We will get the job progress token id - for example - 0001608711762447-242ac112-0001-



2. Use the above job progress token id in the api

API - https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/jobprogress/ (https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/jobprogress/job) token id

Method - GET

https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/jobprogress/0001608711762447-242ac...


I tried at my end and it is working fine.

Attaching screenshot for your reference

View solution in original post

apuna12
Occasional Contributor

Re: Add tests to cycle via API

Hello @BibekBehera,

 

that worked like a charm. It seems there are more APIs which are not included in https://zfjcloud.docs.apiary.io/#reference/execution/get-execution/add-tests-to-cycle

 

Is there a documentation or something which could help me not bother you fine people with this scholar issues?

 

Not promising that I stop asking 🙂 

 

Thanks a lot,

Tibor

New Here?
Join us and watch the welcome video: