Skip to main content

Automation with SoapUI – Part II


Automation-with-SoapUI-p2 by 9series solutions

In the previous article Automation with SoapUI – Part I, we learned about various features of SoapUI for functionality testing of API services and automating test cases & creating Test Suites. However, the usage of SoapUI is not limited to Functional Testing. SoapUI has amazing abilities for non-functional testing like Performance Testing and Security Testing. One of the most important features of SoapUI for performance testing is that we can create complex functionality scenarios and then load test them. This helps test various business scenarios on different loads depending upon usage. In this blog, we will learn the various feature of SoapUI in the Performance Testing domain.
Performance Testing can be classified into various categories –
1. Load Testing – In Load Testing, the Application Under Test (AUT) is subjected to a higher load than its handling capability to test the behavior of the AUT.
2. Stress Testing – In Stress Testing, the AUT is exposed to much Higher loads than its handling capacity to test its breaking point.
3. Soak Testing – The AUT is continuously subjected to high loads for long durations, to test its reliability for higher loads.
4. Baseline Testing – Testing the AUT for the expected normal load, and check how the AUT behaves under normal load.
5. Scalability Load – AUT is subjected to rapid & sudden variations in loads to check AUT behaviour under peak loads.
A Load Test executes the parent Test Case repeatedly for a specific time with the required number of threads or virtual users. A load test can be added to a test case, by right-clicking the Test Case in the navigator panel and selecting New Load Test from the list menu. In the load test window, we can adjust various parameters like the Number of Threads, the Time Limit, Normal & Random Delay. Multiple Load Tests can be added to the Test cases and multiple load tests of multiple Test cases can be run in parallel to each other.
Testing Strategies
We can also select the strategy for the load test from the given options. These Strategies allow us to change the number of threads during execution, which allows us to change load while the load test progresses. Thus we can monitor the results, and change the load on the AUT as the Load Test executes. The data collected for the load test is shown in the Load Test statistics table and is continuously updated as the load test is being executed. The collection and of statistic data is asynchronous and independent from the actual Load Test execution, not affecting the load test directly. Let us see the load testing strategies
9series Solutions : Automation with SoapUI - Part II
1. Simple StrategyIn this strategy, a specified number of threads are running with the specified delay between each run to simulate a real-life scenario for the AUT. Simple Strategy is the default strategy in SoapUI. It has two fields namely Test Delay for entering the delay time and Random field to enter random delay time. The Simple Strategy is commonly used for Baseline testing. It helps to test the basic performance of the AUT and check if there are any bad responses or embedded resource download issues. This strategy can also be used for soak testing and load testing.
2. Variance StrategyIn this strategy, the load varies over time in a sawtooth manner. There are two fields available in this field. First is the Interval field, where we can enter the period in seconds for which the variance in load will take place. Second is the Variance, that is by how much the load needs to be varied. This strategy is good for testing AUT under rapid changes in peak loads.
3. Burst StrategyIn Burst Strategy, a high number of threads are executed for a short time to simulate a burst in web traffic. This strategy is used to test the recovery period of the AUT after it breaks for the unusually high load due to the Burst load. There are two fields in Burst mode namely Burst Delay, where we can enter the period for which the Burst load is to be delayed. Another field is Burst Duration, where we enter the period for which the high load is applied to the AUT.
4. Thread StrategyIn this strategy, you can increase load linearly while the execution of the load test is on. Its main purpose is to identify on which level, statistics begin to deviate from normal behaviour and certain errors are occurring. There are two fields, Starts Threads and End Threads, where we can enter the number of the thread to start with and the number of threads to end with respectively.
Test Statistics:
In the Statistics table, we can see all the statistics related to the load test executed. There are various statistical parameters like CNT, TPS, BPS, error and many more to determine the result of the test and form a detailed report of the performance of the test case.
2
For better visualization of test results, SoapUI provides two graphs showing results of the load test in graphical form.
~ The Statistics Graph shows all relevant statistics for a selected step or the entire test case over time, allowing you to see how values change when you increase the number of threads.
~ The Statistics History Graph shows a selected statistic value for all steps allowing you to compare them and see if the distribution of any value between test steps changes over time.
– AssertionsSimilar to functional assertions in Test Steps of a Test Case to validate the results, we can add Load Test assertions to a Load Test to check both performance and functionality during the execution of the LoadTest. The assertions are continuously applied to Load Test and can fail the Load Test just like their functional counterpart. The assertions which you can add to load test are as follows –
31. Step Average – Asserts that the average value of a Test Step or Test Case doesn’t exceed the specified limit. If the average goes above the value, it fails the load test.
2. Step TPS – Asserts the Transaction per Second (TPS) value for the corresponding Test Step or Test Case. If the TPS is less than specified, the load test is failed by this assertion.
3. Step Maximum – Asserts the maximum value for the corresponding Test Step or Test Case. If it exceeds the specified Max Time, the assertion is failed.
4. Step Status – Checks the errors occurring for the specified number of executing requests does not exceed the specified error limit, else the assertion is failed.
5. Max Errors – Checks that the number of failures for the Test Step or Test Case does not exceed the configured Max Absolute Errors and/or Max Relative Errors value.
When execution of the Load Test, assertion failures are displayed in the Load Test Log. Double-clicking a log entry displays the corresponding result, allowing you to view the failed request message.
Conclusion
SoapUI provides a unique solution to many problems posed to load test your functional automation testing. The various strategies available help in testing the AUT in many different ways and scenarios. The Statistics table provide statistics which are easy to understand and interpret. And Assertions check if the load test statistics are within specified limits. For Load testing API functional tests, SoapUI definitely seems a worthy option.

Comments

Popular posts from this blog

What’s new in Xcode 10

With time technology is moving fast too. This article will provide information about Xcode 10 tool and what is new in Xcode 10 compared to its earlier version. It is beneficial for the developers who like to add new features to their apps. Our experts use the latest tools & technologies to deliver the best to our clients. Xcode 10 is one of the tools we used after thorough testing. 9series always ensures to test all the tools before they use it for your solutions. Below is the synopsis of the blog in case you just want an overview of the same ~  Xcode 10 was announced at WWDC 2018 on 4 June 2018. ~  Xcode 10 includes Swift 4.2 and SDKs for iOS 12, watchOS 5, tvOS 12, and macOS 10.14. ~  Xcode 10 requires a Mac running macOS 10.13.4 or later. ~  It is capable of running multiple simultaneous versions of the Xcode App and any associated tools. The interesting thing about Xcode 10 is that it can coexist with the previous version. Here are the detailed of the new features.

Why Choose Swift Over Objective C?

Dedicating 6 years in improving & using the Objective-C, Apple finally decided to snap another challenge to developers. Again, iOS developers will have to learn this new programming language – Swift. In this article, we are going to look at some points of Swift compared to Objective-C. If you know Objective-C (at least the basics) then this tutorial is best suited to you and want to see what the equivalents are in Swift. So let’s get into it! Swift Language is Easier than the Objective-C: ~  Objective-C has been created using two languages: C and Smalltalk. hence, Objective-C has such a complex, Verbus Syntax. ~  Objective-C obtains its object syntax from Smalltalk while Syntax for the non-objective operations is similarly as C. ~  While the Swift Language is an option to the Objective-C language, the Swift Language is defined as “Objective-C without the C”. ~  Swift is a comparatively a new programming language. Apple started to work on Swift in 2010 and published it to