Ask a Question

start test case form event

SOLVED
vikititor
Contributor

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 some test case "dump_DB_data" in test suite "Reusable"..

How to run full test case? 

I just found a way, how to execute single test step in there.. But I need full test case..

 

Next problem is, that event scripts haves other context.. I am unable to call testCase.run()... there ... there is no run method available..

1 ACCEPTED SOLUTION

Accepted Solutions
vikititor
Contributor

Re: start test case form event

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"}

View solution in original post

1 REPLY 1
vikititor
Contributor

Re: start test case form event

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"}

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: