Forum Discussion

maxrussell's avatar
maxrussell
Contributor
4 years ago
Solved

Bulk editing tests and requests

I have a large test suite which needs to update in relation to the application api test data. I'd like to bulk edit (find and replace type edit) where a particular test case has a given string in name (an asset name) and the corresponding request. Is there a means to do this across a test suite?

  • If it is a composite project, you could save it back to a standard/normal monolithic (.xml) project (switching project type composite to false in project properties).  Once back into a single file project, do your xml changes in a text/xml editor and verify that it works after your changes.  Once satisfied, save back as a composite project.

     

    I have used this technique often.  As you identify patterns in the project, it gets easier to manipulate the project outside of ReadyAPI in your editor.  Here is a fun task... Create a ReadyAPI project (really just a single groovy test step) that creates, reads, updates and writes ReadyAPI projects.

5 Replies

  • richie's avatar
    richie
    Community Hero
    Hey maxrussell,

    Perhaps one of the other forum members have an idea but i suspect the limit of bulk editing testcase names would be limited to changing the selected testcase names to identical values (which is not whst youll want im guessing)

    Are you running a composite project or flat .xml? If flat .xml you could edit the project.xml file (ive done this before a number of times), but id suggest doing the edit in something like xml spy so you can instantly see if youve malformed the xml by accident. Editing the file isnt difficult, you just have to be very careful.

    Ta

    Rich
    • maxrussell's avatar
      maxrussell
      Contributor

      Thanks - yes, running a composite file.

       

      Tests are named in a fashion like:

      1. test 1 assetname1
      2. test 2 assetname1
      3. someothertest anotherassetname
      4. andanothertest anotherassetname

      In each of those the particular assetname would form part of the request.

       

      There is also an edit needed to each time a Data Source step is used, as it would also be pointed at something like assetname1.xlsx etc. The creation of those xlsx files isn't an issue in this case.

       

      I used SoapUI in the past and recall having to do this kind of editing in the XML too.

      • maxrussell's avatar
        maxrussell
        Contributor

        I've had a bit more of a look at this. Using a find across files (VS Code) the only place I see that I can edit my assetname value would be in the request in the test case itself.

         

        Filenames (for excel data source) I cannot edit in bulk.

        Test names themselves (corresponding to assetname) cannot be edited.

        XML filenames of tests would need to be manually changed.