How to rename the data file after each use in Loadtest?

brawalbrawal Posts: 17

Scenario
I want to run a 8 hour test run with millions of records (data is xml file sample xyz10976_10204.TF). if the test need to be stopped after 2 hours and need to re-run the test by using the unsued test data . If the tool use the existing data - we will end up having duplicates. In order to eliminate the duplicate, i want to rename the file .TF.done. so that tool use the remaining unused file.

We have a option in loadtest - use data only once ..option .. this will apply for the current run not for the NExt run.

Do we know any option in loadtest or custom method to get the data file that is being used in loadtest using extensibility tool?

Appreciate your input or suggestions.

Thanks
Birendra

Comments

  • jakubiakjakubiak Posts: 563 admin

    How are you configuring the test to pass the XML files? Are you using a File data source?

  • brawalbrawal Posts: 17

    Yes, we are using the file data source. Thanks for the response.

  • jakubiakjakubiak Posts: 563 admin

    One idea is to put a test at the end of the test scenario that renames the file on disk. The easiest might be to use an Extension Tool that will reference the data source to get the file path, and then use Java API to rename the file on disk. You will need to make sure that this runs even if previous tests in the scenario fail, to ensure that the file gets rewritten.

Sign In or Register to comment.