Forum Discussion
nmrao
6 years agoChampion Level 3
"Events" - feature can be used in this case.
TestSuiteRunListener.afterTestCase - implement this method to delete the files.
For more details, refer documentation below:
https://support.smartbear.com/readyapi/docs/testing/handling-events.html#available-events
You should be easily able to find code samples to delete file online.
TestSuiteRunListener.afterTestCase - implement this method to delete the files.
For more details, refer documentation below:
https://support.smartbear.com/readyapi/docs/testing/handling-events.html#available-events
You should be easily able to find code samples to delete file online.
- BernardV6 years agoOccasional Contributor
Thanks nmrao but I'm not having much luck with my specific scenario and finding what I need, Groovy examples seem very sparce and documentation extremly poor, and I'm having to figure this out myself. I you happen to have an example that would be much appreciated.
- BernardV6 years agoOccasional Contributor
Okay I have figured out a solution that will delete all files after test execution (ideally I would like them to be deleted as they receive a response but I have not found antything that would allow this) also I would love if this was a test step in the GUI of Soap UI, like 'Delete File(s)':
File xmlFolder = new File("C:/test/XML Files") xmlFolder.eachFileMatch(~/.*.xml/) { file - > log.info("${file.name} will now be deleted") file.delete() }
- nmrao6 years agoChampion Level 3That is possible too.
Implement "TestRunListener.afterStep" method and have your code in there.
Related Content
- 2 years ago
- 4 years ago
Recent Discussions
- 18 hours ago
- 17 days ago