Forum Discussion
nmrao do you know of the way to identify the current file 'in-use' by the test case? As if I place my current script in there it will delete everything when it triggers; I need to reference the correct file name in TestRunListener.afterStep.
- BernardV5 years agoOccasional Contributor
Hi nmrao so I'm iterating through a folder that contains .XML files.
Example:
50 .xml files in folder: "C:/test/XML Files"
My SoapUI test currently iterates nicely through each file and submits them to a Soap Webservice:
1. Data Source: Folder (containing .xml files)
2. SOAP Request
3. Data Source Loop (to iterate through and send each file found in the data source folder)
4. Assertions.
Ideally I would like my script to simply delete or move a file that was just submitted in the data source loop.
Thanks!
- nmrao5 years agoChampion Level 3Then you should be able to identify which file you are iterating and delete the same file.
If you there is difficulty in identifying, then set the current file name in test case custom property and read that in the script.