Forum Discussion
Jean-Pierre_DEL
17 years agoNew Contributor
Thanks for your answer.
What we would like to do is the following (see Java code below), this would allow us to add some other SIP tests (SIPUnit).
test
public void tc08useMockResponse() throws Exception {
println("Starting mockResponse");
// load project and get test case
WsdlProject project = new WsdlProject(soapuiProjSIPSnapshot);
WsdlTestSuite testSuite = project
.getTestSuiteByName(soapuiTestsuiteSIPSnapshot);
WsdlTestCase testCase = testSuite
.getTestCaseByName(soapuiTestcaseSIPSnapshotMockResponse);
// run test case
// Wait request
WsdlTestCaseRunner runner = testCase.run(new PropertiesMap(), false);
// get results
List results = runner.getResults();
TestStepResult res = results.get(0);
TestStepStatus response3 = res.getStatus();
assert response3.ordinal() == TestStepStatus.OK.ordinal();
// SOME SIP Unit tests
// ...
// ...
}
I only managed (using mockResponse in Java) to do it by modyfying your source of :
public WsdlTestStepRegistry() {
addFactory(new DataSinkStepFactory());
addFactory(new DataSourceLoopStepFactory());
addFactory(new DataSourceStepFactory());
addFactory(new WsdlTestRequestStepFactory());
addFactory(new GroovyScriptStepFactory());
addFactory(new PropertiesStepFactory());
addFactory(new TransferValuesStepFactory());
addFactory(new GotoStepFactory());
addFactory(new DelayStepFactory());
addFactory(new RunTestCaseStepFactory());
addFactory(new WsdlMockResponseStepFactory());
}
In addition it seems to me not possible to access values in the result (such as the request content).
Actually I'm not sure if that is the right way to do it but it works.
I'm using the assertion in the "mock response" to make my test and get back the status (OK, FAILED), using XPath.
The main idea of what we want to do with Soapui is to make data driven tests,
having all data managed by soapui (in its xml file),and mxing then into SIP dedicated test case written in Java.
We are a team of 10 people, we will buy a first license for further evaluation, is the license schema fully per individuals are can be aslo per site ?
Thanks,
Jean-Pierre
What we would like to do is the following (see Java code below), this would allow us to add some other SIP tests (SIPUnit).
test
public void tc08useMockResponse() throws Exception {
println("Starting mockResponse");
// load project and get test case
WsdlProject project = new WsdlProject(soapuiProjSIPSnapshot);
WsdlTestSuite testSuite = project
.getTestSuiteByName(soapuiTestsuiteSIPSnapshot);
WsdlTestCase testCase = testSuite
.getTestCaseByName(soapuiTestcaseSIPSnapshotMockResponse);
// run test case
// Wait request
WsdlTestCaseRunner runner = testCase.run(new PropertiesMap(), false);
// get results
List
TestStepResult res = results.get(0);
TestStepStatus response3 = res.getStatus();
assert response3.ordinal() == TestStepStatus.OK.ordinal();
// SOME SIP Unit tests
// ...
// ...
}
I only managed (using mockResponse in Java) to do it by modyfying your source of :
public WsdlTestStepRegistry() {
addFactory(new DataSinkStepFactory());
addFactory(new DataSourceLoopStepFactory());
addFactory(new DataSourceStepFactory());
addFactory(new WsdlTestRequestStepFactory());
addFactory(new GroovyScriptStepFactory());
addFactory(new PropertiesStepFactory());
addFactory(new TransferValuesStepFactory());
addFactory(new GotoStepFactory());
addFactory(new DelayStepFactory());
addFactory(new RunTestCaseStepFactory());
addFactory(new WsdlMockResponseStepFactory());
}
In addition it seems to me not possible to access values in the result (such as the request content).
Actually I'm not sure if that is the right way to do it but it works.
I'm using the assertion in the "mock response" to make my test and get back the status (OK, FAILED), using XPath.
The main idea of what we want to do with Soapui is to make data driven tests,
having all data managed by soapui (in its xml file),and mxing then into SIP dedicated test case written in Java.
We are a team of 10 people, we will buy a first license for further evaluation, is the license schema fully per individuals are can be aslo per site ?
Thanks,
Jean-Pierre
Related Content
Recent Discussions
- 6 hours agoLukaszK