Skip to main content
Zephyr
Zephyr Enterprise questions

Get test steps in JSON format via REST API

Problem

How to get test steps in JSON format via REST API

Fix

Zephyr 4.7 allows you to get the Zephyr Test Steps in JSON format using the Rest API. To achieve this you need to pass the path parameter “teststepasjson=true”.

You can use any Rest client to fire the below API to get the Teststeps in JSON format. It will show you the steps in response body as in the picture :

Example

API :

http://<Your Zephyr instance IP:port number>/flex/services/rest/latest/testcase?id=1&teststepasjson=true

Here the “id” is the tcr_catalog_tree_testcase(TCT) id of the particular testcase with testcase.id =3

Refer  How To View Hidden IDs Of Various Components In ZEE to get these id’s.

Response : 

You can also get the same result by passing the direct testcase id :

API :

http://<Your Zephyr instance IP:port number>/flex/services/rest/latest/testcase?testcase.id=1&teststepasjson=true

Here the “testcase.id” is the id of the particular testcase visible in TCR module.

Response : 

Was this page helpful?