Forum Discussion

srishtiK's avatar
srishtiK
Occasional Contributor
9 years ago

disable all POST test steps

Hi,

 I need to disable all the POST test steps from groovy under some conditions. Is there a way to list all POST test steps, or do I have to disable each test Step by name individually

 

Thanks

  • Yes possible! Please use the getMethod() method of RestRequest class to filter it out.

     

    I found the below snippet by scanning through the SoapUI's source code - 

     

     if (httpRequest.getMethod().equals("GET")) 
    {
                method = new ExtendedGetMethod();
    }

    Thanks,

    Kondasamy

  • kondasamy's avatar
    kondasamy
    Regular Contributor

    Yes possible! Please use the getMethod() method of RestRequest class to filter it out.

     

    I found the below snippet by scanning through the SoapUI's source code - 

     

     if (httpRequest.getMethod().equals("GET")) 
    {
                method = new ExtendedGetMethod();
    }

    Thanks,

    Kondasamy