Testcase disable from groovy
Hello!
I have a test that compares a previous stored response with a new response. In order to generate the files I created a test that runs the request and stores the response into a directory/ (eg: C:\Test\Test2022\response.json)
Basically my test suite has two test cases. One that creates the file and one that verifies the data. (data has to be static). Since i don't want to run every time the file creation test case I was thinking that it would be a "test director". A groovy code that can check that the file exists and skip the file creation part and move to validation.
Can someone help me with some info on test runner how to do this?
Sample code:
def filePath "C:\Test\Test2022\response.json"
if( filePath.size() > 10)
testrunner.testcase.disable = true
else
testrunner.testcase.disable = false