free seo tool

Web Services Testing using soapUI

soapUI is a free and open source cross-platform Functional Testing solution. With an easy-to-use graphical interface, and enterprise-class features, soapUI allows you to easily and rapidly create and execute automated functional, regression, compliance, and load tests. In a single test environment, soapUI provides complete test coverage and supports all the standard protocols and technologies.
soapUI is available in free and pro versions. Pro Version provides more technical support and it has more features avaialble to help the testers in automation of web services testing. In this website we will mainly talk about the automation using Pro version of soapUI but at the same time we will try to give guidance how to implement the same using free version as well.

Read more »

Invoke soapUI TestRunner from Command Prompt

Let us see how to execute soapUI test cases using command prompt.

In this soapUI Tutorial, we will see how can we invoke and execute soapUI test cases from command prompt. If you are familiar with soapUI application, you might have used/ noticed an option named "Launch Testrunner". We are calling this feature from a command prompt window to execute our project/ test suite or test cases. Let us peform the below steps to achieve this.

1. Open a command prompt
2. Navigate to soapUI bin folder. For example "C:\Program Files\SmartBear\soapUI-Pro-4.5.0\bin".
3. Now type the step testrunner.bat "C:\Project-Path\project-file.xml"
4. Hit enter

This will invoke and execute soapUI project in the specified project file. The above mentione is the simple way of executing a soapUI project using command prompt. But there are different options which we can provide to the soapUI testrunner.bat to configure the test execution. Here are the parameters which can be used to invoke soapUI testrunner in command prompt.
e : The endpoint to use when invoking test-requests, overrides the endpoint set in the project file
h : The host:port to use when invoking test-requests, overrides only the host part of the endpoint set in the project file
s : The TestSuite to run, used to narrow down the tests to run
c : The TestCase to run, used to narrow down the tests to run
u : The username to use in any authentications, overrides any username set for any TestRequests
p : The password to use in any authentications, overrides any password set for any TestRequests
w : Sets the WSS password type, either 'Text' or 'Digest'
d : The domain to use in any authentications, overrides any domain set for any TestRequests
r : Turns on printing of a small summary report (see below)
f : Specifies the root folder to which test results should be exported (see below)
j : Turns on exporting of JUnit-compatible reports, see below
a : Turns on exporting of all test results, not only errors
o : Opens the generated report in a browser (soapUI Pro only)
i : Enables soapUI UI-related components, required if you use the UISupport class for prompting or displaying information
t : Sets the soapui-settings.xml file to use, required if you have custom proxy, ssl, http, etc setting
x : Sets project password for decryption if project is encrypted
v : Sets password for soapui-settings.xml file
D : Sets system property with name=value
G : Sets global property with name=value
P : Sets project property with name=value, e.g. -Pendpoint=Value1 -PsomeOtherProperty=value2
S : Sets to save the project file after tests have been run
I : Do not stop if error occurs, ignore them
R : Selects which report to generate for the test objects executed, for example if running the entire project, this could specify the name of a test-suite-level report that would be generated for each TestSuite. The report is saved as specified with the -F option to the folder specified with the -f option. (soapUI Pro only)
F : Sets the format of the report specified with the -R option, for Printable reports this is one of PDF, XLS, HTML, RTF, CSV, TXT, and XML. For Data Export this is either XML or CSV (soapUI Pro only)
g : Sets the output to include Coverage HTML reports ( soapUI Pro only )
E : Sets which environment to use (soapUI Pro only)

soapUI Test Runner from Command Prompt Example

testrunner.bat -rjf "Results" "C:\Project-Path\project-file.xml"

Read more »

soapUI Load Test Thread Strategy

In soapUI, performance or load testing of web services can be done using different load testing strategies. A high level idea on this can be viewed in my earlier post "Web services Load Test Using soapUI". In this soapUI tutorial for load testing, we will discuss the use of "Thread Strategy" available in  soapUI. The main configuration settings available in soapUI load testing Thread Strategy are "Start Threads", "End Threads" and the "Limit". Now lets see one by one in detail.

  • Start Threads : We have to mention the number of threads we need when we start our soapUI load/ performance test.
  • End Threads : This is where we set the number of threads we expect at the end of our soapUI load/ performance test.
  • Limit : We can configure this in 3 ways, either we can set the duration of the load test in seconds, or we can set the total number of runs the soapUI test case needs to be executed as part of the load/ performance test. The other option available is Runs per thread, here we can control the total number of time the soapUI test case will be executed on each thread.

Lets see an example on soapUI Load Test - Thread Strategy

Say we want to do our load test for 5 minutes with a starting thread count of 1 and ending thread count of 10, then our configaration should be like below.
Start Threads : 1
End Threads : 10
Limit : 300 seconds
soapUI will start load test with 1 thread and increase the thread count in equal intervals to reach the thread count to 10 until the time limit of 300 seconds are reached.

Read more »