Contact Us
About Us
News
Home
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome,
Guest
. Please
login
or
register
.
October 14, 2008, 02:51:18 pm
Username:
Password:
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forgot your password?
soapui-pro mock response sources
Welcome,
Guest
. Please
login
or
register
.
October 14, 2008, 02:51:18 pm
News:
The Forums are up! Welcome to eviware.
Eviware Forum
General Category
eviware general
soapui-pro mock response sources
« previous
next »
Pages:
[
1
]
Author
Topic: soapui-pro mock response sources (Read 1092 times)
Jean-Pierre DELOUCHE
Newbie
Posts: 3
soapui-pro mock response sources
«
on:
January 15, 2008, 05:31:51 pm »
Hi,
I've been evaluating Soapui-pro for our organisation.
We need to run mixed SIP and WebService tests. So the idea is to run soapui from the source in a TestNG environment.
It seems to me that the test step "mock response" is not in soapui and therefore not open source ?
Thanks
Jean-Pierre
Logged
omatzura
soapui pro users
Hero Member
Posts: 1,326
Re: soapui-pro mock response sources
«
Reply #1 on:
January 15, 2008, 10:09:39 pm »
Hi!
correct, the MockResponse step is not open-source. Exactly how do you plan on running your tests via TestNG?
regards!
/Ole
eviware.com
Logged
Jean-Pierre DELOUCHE
Newbie
Posts: 3
Re: soapui-pro mock response sources
«
Reply #2 on:
January 16, 2008, 10:36:59 am »
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<TestStepResult> 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
Logged
omatzura
soapui pro users
Hero Member
Posts: 1,326
Re: soapui-pro mock response sources
«
Reply #3 on:
January 16, 2008, 02:45:49 pm »
Hi!
yes, this should work if you aren't doing any advanced scripting (ie using the script library)..
Licenses are per individual, but can be generic if you have sporadic users (for example managers, etc.). We do not have any site-licenses at this time, but have very generous volume discounts (check out our purchase page for details;
http://www.eviware.com/component/option,com_wrapper/Itemid,37/
)
regards!
/Ole
eviware.com
Logged
Jean-Pierre DELOUCHE
Newbie
Posts: 3
Re: soapui-pro mock response sources
«
Reply #4 on:
January 16, 2008, 03:58:00 pm »
Question 1 :
Does this means that there is no support for groovy script for "mock response" when doing this way ?
It is working in soapui-pro, but I cannot make it work from my source code.
Question 2 :
Would it be possible to have a public interface for the "mock response" result ?
It could be useful to get data received from the request in the testcase.
Thanks,
Jean-Pierre
Logged
omatzura
soapui pro users
Hero Member
Posts: 1,326
Re: soapui-pro mock response sources
«
Reply #5 on:
January 16, 2008, 08:29:50 pm »
Hi,
1) no, you can get full functionality from within your tests, but you will have to initialize the soapUI Pro core correctly
2) the WsdlMockResponseTestStep has a public getMockResponse() method, which should let you drill down to the last received result..
regards!
/Ole
eviware.com
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> eviware general
-----------------------------
soapUI
-----------------------------
=> soapUI
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.2
|
SMF © 2006-2007, Simple Machines LLC
Loading...