Forum Discussion

maddenapally's avatar
maddenapally
Contributor
6 years ago

How to retrieve all test steps using groovy script

Hi Team,   I want to retrieve all the test steps from test case, Need to add headers to the each step.   Regards, Karthik
  • Radford's avatar
    Radford
    6 years ago

    I'm sorry I haven't had experience of that so I can't really offer specific advice, but have a look at the Event Handling functionality:

     

    https://support.smartbear.com/readyapi/docs/testing/handling-events.html

     

    In particular the RequestFilter.filterRequest event. The recent version of ReadyAPI come with a sample script with the comment:

     

    "// Sample event script to add custom HTTP header to all outgoing REST, SOAP and HTTP(S) calls"

     

    This sounds like what you are after.

     

    Edit: It was Version 2.4 which added the sample event handler scripts to new projects.