cancel
Showing results for 
Search instead for 
Did you mean: 

Bulk editing tests and requests

SOLVED
maxrussell
Contributor

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?

1 ACCEPTED SOLUTION

Accepted Solutions
TNeuschwanger
Contributor

Re: Bulk editing tests and requests

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.

View solution in original post

5 REPLIES 5
richie
Community Hero

Re: Bulk editing tests and requests

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
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
maxrussell
Contributor

Re: Bulk editing tests and requests

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
Contributor

Re: Bulk editing tests and requests

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.

TNeuschwanger
Contributor

Re: Bulk editing tests and requests

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.

View solution in original post

sonya_m
Community Manager

Re: Bulk editing tests and requests

Thank you for help Richie, TNeuschwanger!

 

@maxrussell does the advice help? 


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Top Kudoed Authors