Zephyr Scale Server/DC Ideas

Search, vote, comment and create ideas for Zephyr Scale improvements here. For more information on our review process, see here.

Retrieve test data while running a custom listener

Attached is the script using which I'm getting the test case key for which the data was changed.

Post that I need to get the STEP, TEST DATA and EXECUTION RESULT of the corresponding test case. Are there any API's to get the above mentioned data?

  • Phaneendra Pasare
  • Aug 13 2020
  • Not for now
As a... Developer
I would like... an API to retrieve the Test Data that are part of the test script in the custom listener.
So that I... can perform an upfront validation of the test data once it is saved by calling the custom listener on the TestCaseChangedEvent
  • Attach files
  • Admin
    Deita Howard commented
    14 Aug, 2020 03:19pm

    So, the body of the response for the endpoint is included in the API docs here.

    The idea would be to send a request to the REST API (rather than the Java API used with ScriptRunner) to get this info. You'd just need to create a request as you usually would within a ScriptRunner script.

    Does that make sense?


  • Phaneendra Pasare commented
    14 Aug, 2020 02:02pm

    Hello Deita,

    Thanks for your response. Is it possible to give a sample code for your solution.

  • Admin
    Deita Howard commented
    14 Aug, 2020 01:56pm

    Hi Phaneendra, I've just looked into this and our GET test cases API actually does return the test data for a given test case, but it's logged under "Parameters". Very confusing, I know.

    The reason for this is that, when we first released Test Data back in the day, we called it Parameters, and the API hasn't been updated to avoid disruption. We'll be doing this moving forward.

    Does this answer your question?