Forum Discussion

LennSar's avatar
LennSar
Contributor
3 years ago

Update Functional Tests when OpenApi Spec changes

Hi there,

we are creating ReadyApi projects by importing OpenApi Specs and let ReadyApi do the first magic. My question is whether the automatically generated Test Cases can be updated when the OpenApi Spec changes. For example if I fix a typo in a request path in theOpenApi spec I'd like Test Cases that contain it to update on that automatically or by some click of a button. 

 

We are still just trying ReadyApi and it looks really promising but this issue is a huge problem. Having to redo all the work like adding Data Source Loops and specific command sequences because we need to reimport the OpenApi spec due to a fix in that spec is not an option. 

 

Any suggestion is highly appreciated.

 

Thanks,

 

Lennart

5 Replies

    • LennSar's avatar
      LennSar
      Contributor

      Hi richie,

       

      thanks for your  suggestion. I can update the API section now but I'd actually like to update the Functional Tests section which does not update along with the API section.
      So let's say I have a Functional Test with a Test Case "myTestCase" that checks the reponse of a get request with the path "simple/non/correct/path". 
      by running the test I figure out that the path is not correct and hence I change it in the Open Api spec to "simple/correct/path". Let's further assume I have this get request in 10 other test cases as well. Is there any way to update all those get requests by reloading the OpenApi spec or can this just be done in the API section

       

      Thanks,

       

      Lennart

      • richie's avatar
        richie
        Community Hero

        Hey LennSar 

         

        the 'refactor API' functionality is supposed to update the test steps as well as the API requests.

         

        Did you try the 'refactor' option as well as the 'update' option?

         

        Cheers,

         

        Rich

         

  • yimy's avatar
    yimy
    Community Manager

    Hi LennSar 

     

    Could you let us know if richie 's suggestions/answers helped? If it did please mark it as a solution, or let us know if you have additional questions.

     

    Thanks!

    • LennSar's avatar
      LennSar
      Contributor

      Hi richie

       

      sorry for the delay. I double checked but it seems that the refactor process is not doing anything. I created a new project and than adjusted the OpenApi.yaml afterwards. If I know run the refactoring nothing is happening. The pop up closes without any loading bar or anything. Afterwards the adjusted request is neither changed in the API nor in the Functional Test section. I feel like I'm doing something wrong. Will have a another look later in the day.