Forum Discussion

FlorianNeudert's avatar
FlorianNeudert
Regular Visitor
4 years ago
Solved

Export Test Cases including "Details", "Test Script" and "Execution"

Hello, 

I am familiar with how to export Test Cases and it works smoothly if you are interested in the Details and the Test Script sections. However, what I have not yet figured out, is how to export the "Execution" section as well. Reason why: we are moving from one JIRA instance to another and due to auditing reasons I need to export all Test Cases (incl. details, test scripts and execution) from the old instance and import these Test Cases to the new JIRA instance. 

Thank you for your help in advance! 

Regards,

Florian 

  • Right, so on Server you could do something like the pseudo-code below:

     

    var testCycles = GET /testrun/search?query=projectKey = "ABBC"
    
    foreach (testCycles in testCycles) {
        var testExecutions = GET /testrun/{testCycle.key}/testresults
        // TODO do something with the test executions here
    }

     

4 Replies

  • Jip241's avatar
    Jip241
    Occasional Contributor

    Same Problem here. I was looking at the REST API but could not figure it out.

    I ended transporting everything with the XML export/import. and added pictures and attachments manually.

     

    Not sure how to move executions. It should be possible when I look at the REST API to add executions, but I don't know how to get it out of TM4J/Zephyr Scale.

     

    Sorry I can't help you further. 

    • vpelizza's avatar
      vpelizza
      Staff

      Not a very intuitive one, but the endpoint GET /testrun/{testRunKey}/testresults can be used to retrieve all executions of a particular test run, assuming you are on Zephyr Scale Server.

       

      For Cloud, there's a GET /testexecutions that should do the trick.

      • Jip241's avatar
        Jip241
        Occasional Contributor

         Thanks for this suggestion. Where do you see which cycle has which test resultkey?

        We use Zephyr Scale Server.