Forum Discussion

AlexQA's avatar
AlexQA
Occasional Contributor
3 years ago
Solved

Question for AQA. How to push TestNG automation test results into needed TestSycle?

Hi All,

 

I am test automation engineer. I try to integrate Zephyr Scale into my automation project. 

I use this API call to do this:
https://api.zephyrscale.smartbear.com/v2/automations/executions/junit?projectKey=RLPR&autoCreateTestCases=false(or True - it gives the same results actually). PLPR is my project and this param works good. autoCreateTestCases param seem not working to me.
As the results of this API call it creates a new TestCycle with my executed test cases and results witch is good already!

But! it creates this TestCycle somewhere even not visible in the UI. So no one could not even find it easily. I managed to find it guessing the IDs over the URL. The reason I see - the folder is not selected for this automatically created TestCycle.

What I want to do but can not find how: add my results to the already created TestCycle? 
My best case scenario and proposed workflow is:
1. We start regression testing -> Create TestCycle with name 'Regression' with all available test cases in Zephyr Scale.
2. I run my automation test cases. Let's say there are 100 test cases automated.
3. I run API call to mark my results in 'Regression' TestCycle.
Please, help cuz I do not see good options right now.

Thanks a lot!

 

  • Hi Alex,
    the documentation might not be clear. But the planned start date and planned end date will be filled automatically when you upload your results.

    So you can simply remove the customFields attributes in the testCycle object.

    This hash for the test cycle object should work the way you expect it.

    {
    "name": "Unique name",
    "folderId": 2053487
    }

     

  • Hi AlexQA!

    I'm glad you were able to use this feature and it's working for you.

    Regarding your request, I'm afraid we do not provide this feature yet, a new test cycle will always be created.

    There's an idea in our Ideas Portal requesting that feature. Feel free to upvote it and help gather interest around it: https://zephyr-scale-cloud.ideas.aha.io/ideas/TM4JC-I-595

     

    Cheers!

7 Replies

  • AlexQA's avatar
    AlexQA
    Occasional Contributor

    Guys, I think I am near the solution, please help to do last step.

    Dates are required params in Jira, I will try to make them not required on Monday:


    This is what I need to pass to the API call:

    This is what I receive

    This is what I have in TestCycle object. Actually a mess for me.

    Do you see what I am doing wrong?

     

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Thanks a lot for posting this question, Alex!

       

      Let's ask out Community Leaders for help. Hi MisterBjosh42! Could you take a look at the thread? Perhaps you will be able to help Alex! Thank you🙂

      • josh42's avatar
        josh42
        Community Hero

        Hi,

         

        I'd love to help, but I don't have any experience with the cloud API. I also have no experience with the JUnit result uploads.

         

        Sorry, I can't be of any help here.

         

        Cheers

        Josh

    • DavidL's avatar
      DavidL
      Staff

      Hi Alex,
      the documentation might not be clear. But the planned start date and planned end date will be filled automatically when you upload your results.

      So you can simply remove the customFields attributes in the testCycle object.

      This hash for the test cycle object should work the way you expect it.

      {
      "name": "Unique name",
      "folderId": 2053487
      }

       

      • AlexQA's avatar
        AlexQA
        Occasional Contributor

        Hi Guys, DavidL jfelix josh42 sonya_m 

        Thanks for the answers. I really appriciate it.

         

        By the time I am already able to create new TestSycle using postman with Name and Description in NeededFolder. And that's already a progress.

        Now I need to find the way how can I post results into another TestSycle, not to create a new one? For me it seems to be not possible at all.
        So the user scenario:
        1. My team lead Anna creates a TestSycle 'Regression' with all all test cases we have.
        2. I run my automation test cases and want to post the results in 'Regression' TestCycle from step1. (Do not create a new one).
        I would be really happy! if you tell me how to do it 🙂

        Anyway, thanks a lot!

    • jfelix's avatar
      jfelix
      SmartBear Alumni (Retired)

      Also, AlexQAplannedStartDate and plannedEndDate cannot be made not required.