Forum Discussion

TetsuoF's avatar
TetsuoF
Visitor
2 years ago

Is it possible to add test cases to a test cycle from API?

We plan to start to use Zephyr Scale. To import from test cases/cycles managed in excel file, I'm looking for the way that add Test Cases to a Test Cycle without Zephyr Scale UI.
Is there any API that enable it?
II referenced the API document but I cannot found test case or related parameter in Test Cycles API.

Thank you.

  • MisterB's avatar
    MisterB
    Champion Level 3

    Reading the documentation it seems like the endpoint to use is "POST Create test execution ".  That will effectively add a test case to a test cycle.  I assume you would set the status to Not Executed if you just want to add the test case, or set it to Pass/Fail, etc., if it has been executed.

     

    As you can see from the documentation the endpoint expects the Project key, Test Case key, Test Cycle key, and a test execution Status.

     

     

      • MisterB's avatar
        MisterB
        Champion Level 3

        Dropping this in the correct location...

        Devyanikonde, I don't know much about using the API, but I'm sure this question has been asked and answered before.  I would like to find that post for you but the forum search feature is currently not working for me.  You could ask the SmartBear support team - they usually respond quickly with an answer.  You can reach them here: SmartBear Support

  • Hi,

     

    If you want to add test cases to a test cycle in Zephyr Scale using the API, you can follow the steps outlined in the Zephyr Scale API documentation.

    Here's a general guide based on the provided information:

    1. Add Test Cases:

      • Use the API endpoint for adding test cases. Refer to the Zephyr Scale API documentation for details on the request payload and parameters.
      • This step involves specifying the test case details, such as the project, issue type, summary, and other relevant information.
    2. Create Test Cycle:

      • Use the API endpoint for creating a test cycle. Refer to the Zephyr Scale API documentation for details on the request payload and parameters.
      • Provide the necessary information for the test cycle, such as the project, cycle name, start date, end date, and other relevant details.
    3. Add Test Cases to Test Cycle:

      • Once you have created the test cycle, you can use the API endpoint for adding test cases to the cycle. Refer to the Zephyr Scale API documentation for details on the request payload and parameters.
      • Specify the test cycle ID and the list of test case IDs to be added to the cycle.

    Make sure to handle authentication and authorization properly by including the necessary API tokens or credentials in your requests.