Forum Discussion

Santhosh_P's avatar
Santhosh_P
Contributor
8 years ago

how to update methods(service) dynamically using groovy script?

I need a groovy script to update the methods dynamically. I have attached the screenshot of my methods(dropdown). So i have a list of methods to call in a test case. Ex: StateDetails, Eligibility, PreRate.

How do i select/update  the method from the dropdown as and when the corresponding method is called? Or how else do i update the endpoint dynamically through groovy? 

I use REST with XML.

 

I have attached the screenshot of my methods. 

  • nmrao's avatar
    nmrao
    Icon for Champion Level 2 rankChampion Level 2
    You mean to say how to update the project If there is change in the swagger definition or wadl file is updated?
    • Santhosh_P's avatar
      Santhosh_P
      Contributor

      No. Nothing to do with swagger. So i have 7 endpoints to be run dynamically.

      Below is the screenshot of the steps:

       

      It's the wadl file.

       

      1> Get data from excel sheet.

      2> One of the column names in the excel will have " Calls to Make" which will have - StateDetails,Eligibility,Prerate, Rate

      3> Put the calls to Make in a list and call them in an order to execute.

       

      So i need the groovy script to dynamically change the dropdown values as shown in the screenshot.