Testing & Monitoring Web Services Using soapUI in NetBeans IDE

Modifying and Executing Test Cases

The test cases or test steps are usually SOAP requests that are sent to the Web Service endpoint. They can be modified using the editor, which can be activated by a simple double-click or "Open Editor" action on the test step.

It is possible to add additional HTTP headers, authentication information or attachments to the request, using the tabs at the bottom of the editor. Test assertions can also be added. Once the test case is ready, it can be executed by pressing the green arrow (top left corner). The test case response is shown on the right side. The request log indicates the response time for this test case.

Load Testing

Along with functional testing, NetBeans IDE 6.1 with the soapUI Plugin provides load testing for web services.

To create a Web Service load test, right click on the Load Test Node under Web Services Tests in the project view and execute "Create Load Test" action. Specify name on the dialog and click OK. This will create the Load Test and open its Load Test Editor. The Load Test has several configurable parameters, such as number of threads, test duration, test strategy etc, which can be set using the editor. The Load Test can be executed by pressing the green arrow (top left corner). The table provides statistical information related to the execution of the service, such as the time it took to get a result from the service and the number of transactions per second.

Web Service Simulation

Web service simulation can be a very useful feature when you don't have the target Web Service available. This allows clients of the target web service to redirect to a mock version of the web service, with predefined responses. To create a mock service, right click on the port-binding node representing the target web service, under Web Services Tests node in project view. Invoke the "Generate MockService" action, which displays the following dialog.

Select the operations to be simulated, port number, and web service path information. Click OK. Specify the name of the Mock Service and click OK. This will create the Mock Service and open the Mock Service Editor. To start the Mock Service click on the green arrow (top left corner).

To modify the Mock Response, double-click on the desired Response under the MockService node in the project view. This will open the Mock Response Editor. Modify the response on the right side as required.

AttachmentSize
figure1.jpg12 KB
figure2.jpg36 KB
figure3.jpg12 KB
figure4.jpg68 KB
figure5.jpg44 KB
figure6.jpg32 KB
figure7.jpg28 KB
figure8.jpg28 KB
figure9.jpg28 KB
figure10.jpg52 KB
figure11.png96.08 KB
figure11.png96.08 KB
figure12.png3.63 KB
figure13.png11.48 KB
figure14.png27.55 KB
0
Average: 5 (1 vote)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Varun Nischal replied on Thu, 2008/06/26 - 2:16pm

Hi,

My name is Varun Nischal and I'm the NetBeans Community Docs Contribution Coordinator. Your Dzone entry would make fantastic Tutorial for our Community Docs wiki (http://wiki.netbeans.org/CommunityDocs).

If you aren't a Sun Employee, Would you be willing to contribute it? If you need any help or have any questions, please contact me at nvarun@netbeans.org

I look forward to hearing from you.

Thanks,
Varun Nischal
http://nb-community-docs.blogspot.com/
--
"You must do the things you think you cannot do."

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.