Forum Discussion

michaeldooley's avatar
michaeldooley
New Contributor
6 years ago

Best approach for saving data from test case runs

I have been using ReadyAPI for a while now, and have been very happy with it. There is one minor thing that nags me that I am looking to change. I do a lot of testing where I follow this procedure

 

- create object with POST

- use Property Transfer to save the GUID of the created object into a Properties test step

- use the GUID to perform a PATCH on the object

- use the GUID to perform a GET on the object

- use the GUID to perform a DELETE on the object

 

I am using a composite project. Each time the test runs, I get a new GUID. The GUID is saved as part of the test and the Source Control system recognizes that the XML file that contains the contents of the test has changed.

 

I would like to change the way that I create my test so that the GUID that is saved is NOT a part of the test itself, so that the source control system would not see this data. I see that there are options for storing data in csv file, excel files and even using a SQL database. What would be the best approach to get this test data out of the test files themselves?

Thanks in advance....

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Another simple alternative is to clean the values of the properties at the end of the test execution, could be part of TearDown script.
      • nmrao's avatar
        nmrao
        Champion Level 3
        Welcome!

        Remember posting such script either in this forum or on stackoverflow which you should be able search as well in case if you need a sample code.