Using Groovy Script to Generate and Validate Data in soapUI
soapUI is the leading tool for Web Service Testing, it provides extensive options for scripting to do more flexible testing, e.g. generate test data and validate it.
Let's assume a scenario, we receive a Web Services which contains id and name information, and save them to database table named 'a_table'.
1. Add following script to 'Setup Script' in TestCase:
2. Add Properties
3. Modify Test Request
4. Add Script Assertion for validation
星期四, 十二月 31, 2009 | 标签: soapUI, Web Services | 0 Comments
Using Dynamic Endpoint in soapUI
1. Create a file named soapui.properties, put it into your soapUI home/bin directory.
soapui.properties Sample:
2. Open your TestCase and set the endpoint to your endpoint property name, e.g. ${##serviceA.endpoint}
3. Run your TestCase, the endpoint will be replaced successfully.
星期四, 十二月 03, 2009 | 标签: soapUI, Web Services | 0 Comments
Let soapUI 'Deploy As War' Supports Multi Projects
soapUI的Deploy As War can deploy MockServices as a WAR,but only supports one project, if you want to use multi projects, you need to deploy corresponding multi WARs. Can I make it easier?
After reading MockAsWarServlet
source code, I found when init Servlet, it will read projectFile
param, and load project file to start MockServices in this project.
So we can make a little change, add a parameter called projectPath
, located all of projects file. It will scan all of projects file in that directory at Servlet init step, and start corresponding MockService one by one.
Download jar
web.xml:
星期五, 十一月 20, 2009 | 标签: 开发, java, soapUI, Web Services | 0 Comments