JackD
12 years agoNew Contributor
Using testcases from another testproject
Hi,
I am running several testprojects at night using Maven plugin/Jenkins.
One of the test projects (A) contains several jdbc requests for setting up the environment.
What I want to do is, in this nightly run, when a particular testproject (B, C, etc) starts, first call a testcase from testproject A in order to setup part of the environment.
I have created groovy scripts in testproject B etc (however, I am not an expert on this...):
//get test case from other project
project = testRunner.getTestCase().getTestSuite().getProject().getWorkspace().getProjectByName('testproject A')
testSuite = project.getTestSuiteByName('testsuite A.1');
testCase = testSuite.getTestCaseByName('testcase A.1.1');
// run test case
runner = testCase.run(new com.eviware.soapui.support.types.StringToObjectMap(), false);
log.info runner
When I run soapUI GUI it works, but I have noticed that testproject A must be opened as well.
Is, what I want to achieve, possible (and how) in this nightly run?
Thanks for any help!
Jack
I am running several testprojects at night using Maven plugin/Jenkins.
One of the test projects (A) contains several jdbc requests for setting up the environment.
What I want to do is, in this nightly run, when a particular testproject (B, C, etc) starts, first call a testcase from testproject A in order to setup part of the environment.
I have created groovy scripts in testproject B etc (however, I am not an expert on this...):
//get test case from other project
project = testRunner.getTestCase().getTestSuite().getProject().getWorkspace().getProjectByName('testproject A')
testSuite = project.getTestSuiteByName('testsuite A.1');
testCase = testSuite.getTestCaseByName('testcase A.1.1');
// run test case
runner = testCase.run(new com.eviware.soapui.support.types.StringToObjectMap(), false);
log.info runner
When I run soapUI GUI it works, but I have noticed that testproject A must be opened as well.
Is, what I want to achieve, possible (and how) in this nightly run?
Thanks for any help!
Jack