Forum Discussion

Sandyapitester's avatar
Sandyapitester
Frequent Contributor
9 years ago

Rest API automation - GET method API URL if changing assert ID, do we need to create a new suite?

Hi Guys,

Rest API Automation

If am going to change the assert id in the GET method rest API URL in soapui , do I need to create new test suite or will allow to reuse the exisitng test suite in SOAPUI 5.2.1 Trail version.

 

If yes let me know steps to work

  • rupert_anderson's avatar
    rupert_anderson
    Valued Contributor

    Hi,

     

    If I'm understanding you right, you have an Assertion with a fixed value (id) in a GET request in a REST Request TestStep and you want this to vary when automating (running SoapUI from a script)? If so, then it sounds like all you need to do is to use a property (variable) as a "parameter" in the Assertion, then you can pass in different values for the Assertion to check at runtime - then yes, this is possible in all versions of SoapUI.

     

    Is this the sort of thing you meant? If not, please provide an example of the response and Assertion that you want to do and hopefully I or someone else can help.

     

    Regards,

    Rup

     

    • nmrao's avatar
      nmrao
      Champion Level 2
      I am second to Rupert. Could not understand the question.

      Is it something that the user wanted to test with variying Ids? In that case, trying TEMPLATE parameter.
      • Sandyapitester's avatar
        Sandyapitester
        Frequent Contributor

        In my API user ID need to change in soapui resource, that is the big pro in my automation how to make it dynamically

         

    • Sandyapitester's avatar
      Sandyapitester
      Frequent Contributor

      Yes, you are perfect could be plz help me out to do this process

       

      Need to pass diff id in the same api URL 

       

      ex 

       

      In my API rest has userid id like

      http://www.thomas-bayer.com/sqlrest/CUSTOMER/IIC123000

      IIC123000 is my userid and created the new test suite


      for some other reason am changing the user id

      Ex:

      http://www.thomas-bayer.com/sqlrest/CUSTOMER/IIC123001  

      ( No request and response parameter changed only data cget changed )

       

      it's possible to change the userid in the existing suite and reuser the same suite for api automation