Forum Discussion
vinniew
3 years agoStaff
Hi Alan,
Did the other thread solve this issue?
Just dbl checking for reference?
KR
Vinnie
- Claddaghduff3 years agoOccasional ContributorNo, it uses a different way. As I'm using Zephyr Scale Cloud I access that via https://api.zephyrscale.smartbear.com/v2 and append the appropriate endpoint e.g. /testcases or /testcycles etc. (https://support.smartbear.com/zephyr-scale-cloud/api-docs/)For accessing the API, you must generate an access key in Jira. To generate an access token, click on your profile picture at the page bottom left, and choose the option “Zephyr Scale API keys".support.smartbear.comThis code here adds a test execution into Zephyr Scale for the test case however I've hard coded the values (just to make sure it will work) as I can't figure out how to get them via the api.function createPostRequest(endpoint="/testcases"){let address = "https://api.zephyrscale.smartbear.com/v2" + endpoint;let request = aqHttp.CreatePostRequest(address)request.SetHeader("Content-Type", "application/json");request.SetHeader("Authorization", "Bearer <zephyr scale api token>")return request;}function createTestExecution(){let test = getLastTest();let request = createPostRequest("/testexecutions")let requestBody = {"projectKey": "VRTWB","testCaseKey": "VRTWB-T6","testCycleKey": "VRTWB-R1","statusName": "PASS","testScriptResults": [{"statusName": "PASS","actualEndDate": "2022-01-20T13:15:13.000Z","actualResult": "User logged in successfully"}]}let str = JSON.stringify(requestBody)let response = request.send(str);Log.Message(response);}
- Claddaghduff3 years agoOccasional Contributor
Hi Vinnie,
I think I should have put this question in the Zephyr Scale community as it is related to that API. I am calling it from TestComplete but the data I'm looking for is designed by Zephyr Scale.
- Claddaghduff3 years agoOccasional Contributor
Hi Vinnie,
Can you remove this or the duplicate I created. I added a post on Zephyr Scale Community as I hadn't realised that you could had the ability to move it across?
Thanks,
Alan
Related Content
- 4 years ago
- 7 years ago
- 2 years ago
- 2 years ago
Recent Discussions
- 8 days ago