Java Reference
In-Depth Information
xmlns:msgns="http://soacookbook.com/wsdl/CustomerProcessEsb"
xmlns:ns1="urn:com:soacookbook">
<customerFullName xmlns="">Homer Jay Simpson</customerFullName>
</ns1:getCustomerFullNameResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
NOTE
The first time the test is invoked, you may be in for a shock. The testing tool won't know what to
expect as a response, so your first execution will fail. Once you get a response that you expect and
that you want to compare future invocations against to determine if they've passed, right-click on the
Output node and select “Use Recent Result as Output”. The next time you invoke the same service
with the same parameters, the response will be compared against this result; if they match, the tool
assumes that your test has passed.
This output represents the desired result. Therefore, you want to save it so that future invoc-
ations will check against this SOAP response to determine if they passed or not. To save this
output, right-click on the file (the name should be the date and time at which you executed it)
and click “Use as Output”.
Now if you run the test again, you should see the more favorable output in the console:
Test TestHomer
Threads count Success: <1> Error: <0> Not completed: <0>
------------- ---------------- ---------------
BUILD SUCCESSFUL (total time: 1 second)
Load testing
NetBeans 6.X makes it easy for you to do some light load testing as a developer. If you click
on the name of the test in your project view, you should notice a palette on the righthand side
of the IDE that contains properties for the test. Tweak these values to add a number of concur-
rent threads and a number of invocations of the service that each thread should perform.
For example, on my core duo Linux workstation that is running both the server and the client,
I set the number of concurrent threads to 4 and the number of invocations per thread to 10.
That will run the test 40 times with the click of a button. And because I also checked the “Cal-
culate Throughput” property, the tool will tell me how long it is taking to go from the test
through the orchestration, to the web service, and back. Here's my result:
Threads count Success: <4> Error: <0> Not completed: <0>
Throughput: <40> invocations in <11.129>s = <3.594213316560338>
invokes/s
Search WWH ::




Custom Search