Zephyr Scale Server API (v1) folder specific /testrun/search returns all test runs of the project
We are using ZS version 9.7.0 on Jira data center with Zephyr Scale Server API (v1).
We have a project (TESTMGMT) with a calendar week based folder structure where we place the different test cycles in.
To place the test execution within the right calendar week cycle, we call the /testrun/search with the parameter mentioned in the documentation https://support.smartbear.com/zephyr-scale-server/api-docs/v1/
Our GET request looks like this:
https://our-jira-url.com/rest/atm/1.0/testrun/search?query=projectKey = "TESTMGMT" AND folder = "/TM/2023/KW 49"
This unfortunately does not return the one test cycle in the folder "/TM/2023/KW 49" but instead all test cycles in the project TESTMGMT.
Do you have any idea, why the folder part of the query has been ignored?
Solved! Go to Solution.
Zephyr Scale Server
I'm not a user of the APIs yet but taking my understanding is that the term "testrun" translates to "test cycle". I'm guessing you have to specify the test cycle(s) you want results for by adding the test cycle key as criteria to the Key parameter. If a Key isn't provided it would make sense that the API returns results for all test cycles for the project.
Need more help? Feel free to connect with me on LinkedIn: https://www.linkedin.com/in/andrew-barbet-548a234/
Your understanding is correct in terms of testrun = testcycle. However, the search requires a query which is like "give me all testcycles in the project / folder". An that's what the api docu describes. We do not know the exact test cycle id - for this reason we start the search as we want to connect our test executions with a certain test cycle and they are organized in calendar weeks.
Hi @hlackerm ,
I can not reproduce this on our Jira instance. Make sure, you encode all necessary characters for the url. Like this: /testrun/search?query=projectKey%3D%22TESTMGMT%22%20AND%20folder%3D%22%2FTM%2F2023%2FKW%2049%22&fields=key,name
Maybe this helps. Let me know.