Forum Discussion

vikititor's avatar
vikititor
Contributor
3 years ago

start test case form event

I want to do some DEBUG of the DB state.. so after each TestCase I NEED dump data of one DB table.. This is done in some test case and the response in XML is stupidly dump in to log.info.. So I have...
  • vikititor's avatar
    3 years ago

    def testCase = testRunner.testCase.testSuite.project.getTestSuiteByName("Reusable").getTestCaseByName("dump_DB_roles")
    def properties = new com.eviware.soapui.support.types.StringToObjectMap ()
    def async = false
    String testSuiteName = testRunner.testCase.testSuite.getName();

     

    // this condition is here to avoid, that test case will be executed in never ending cycle.. Is not required to be started once parent testSuite is the same called Reusable.. because there are just test case like methods reused in my tests.

    if (!testSuiteName.equals("Reusable")) {
    log.info "execute the test"
    testCase.run (properties, async)
    }
    else {
    log.info "not executed"}