Ask a Question

Can we execute zephyr test case using zephyr api

SravaniM
New Contributor

Can we execute zephyr test case using zephyr api

Hi,

 

Can you please let me know if there is any API to execute Test cases in zephyr using API.  Below are the actions performed using zephyr APIs.

 

Followed procedure in below page and successfully created new cycle, Added new folder to cycle, and added tests to the folder. Now I want to  Execute the tests(Pass or fail) through Zephyr APIs. I have gone through the document but couldn't find any API to execute tests. Please let me know if there is any possibility to execute the tests using zephyr APIs.

 

  https://getzephyr.docs.apiary.io/# 

3 REPLIES 3
MisterB
Community Hero

Hi,

 

Here's a link to the official Scale API for Cloud and Server (depending on which version you have).

 

For Cloud, it's POST - Create test execution

 

For Server/DC, it's POST - /testrun/{testRunKey}/testresults

 

Hope that helps.



Need more help? Feel free to connect with me on LinkedIn: https://www.linkedin.com/in/andrew-barbet-548a234/

Hi @MisterB 

Thanks for the quick reply

I am using JIRA cloud. I have referred to POST- Test Case creation API. It have following endpoint https://api.zephyrscale.smartbear.com/v2/testexecutions

 

Below are the endpoints used:

For adding test cycle in zephyr: POST: https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/cycle

For adding folder to test cycle: POST: https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/folder

For adding tests to cycle: POST: https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/executions/add/cycle/ <cycleID is passed>

Creating execution: POST: https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/execution

 

SravaniM_0-1678970402472.png

But the status is UNEXECUTED in response for the testID provided. 

 

The base URL that you have provided and I am using for APIs is different. Can you please provide your insights on this.

MisterB
Community Hero

The API link I've provided is the one that's listed in SmartBear's Help file.  I'm not familiar with the one you're using.  I'm assuming you're using Zephyr Scale and not Zephyr Squad?

 

Here are some links to help:

 

SmartBear Help file for Zephyr Scale Cloud: Zephyr Scale Cloud Documentation (smartbear.com)

Page that discusses REST API: REST API (overview) | Zephyr Scale Cloud Documentation (smartbear.com)

 

SmartBear support portal: SmartBear Support



Need more help? Feel free to connect with me on LinkedIn: https://www.linkedin.com/in/andrew-barbet-548a234/
cancel
Showing results for 
Search instead for 
Did you mean: