Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:load_testing [2020/12/31 20:10]
admin [Load testing with multi-browser]
tutorial:load_testing [2021/01/05 03:00] (current)
Line 9: Line 9:
   * [[#Load testing with cloud-based services]]   * [[#Load testing with cloud-based services]]
   * [[#Simulating production load]]   * [[#Simulating production load]]
-  * [[#Performance testing]]+
  
  
Line 32: Line 32:
 You can also change how fast you want to ramp up the VUs by setting the "Thread Delay (ms)" before starting next VU. You can also change how fast you want to ramp up the VUs by setting the "Thread Delay (ms)" before starting next VU.
  
-For load / stress testing, typically you will want the model and all of its VUs to be running for a desired period of time.  You can do so by setting "Elapse Time (mins)" in "Model Execution Stop Conditions" section before running the model. +For load / stress testing, typically you will want the model and all of its VUs to be running for a desired period of time.  You can do so by setting "Elapse Time (mins)" in "Model Execution Stop Conditions" section before running the model. 
 + 
 +When running the model with IDE, be sure to select "Random" sequencer such that the model will be traversed randomly to simulate realistic user behavior while still maintaining validity of the test scenarios as described by the model. 
 + 
  
  
 ===== Multi-model execution ===== ===== Multi-model execution =====
-The first step in load testing is to determine the type of loads and how much you wish to exercise on AUT. Typically you would already have suite of models created for functional testing of AUT. These models when executed generates a specific type of loads on AUT. 
  
-Carefully select subset of these models that will generate the type of loads required and determine the number of virtual users for each selected modelsYou may use the following example to help you plan your next load testing:+Each model describes set of behavior (requirements, user stories) of AUT. By running the model, we are exercising and checking those behavior
  
-    Model Nam           MCase             VUs   Run Duration (min)   Thread Delay (ms) +If you have more than one models created to test your AUTyou may want to run these models concurrently to expose your AUT to various types of activities described by these models.
-    WebStore Security                      20        60                   15000  +
-    WebStore Main                         300       120                    5000  +
-    WebStore Main       Quick Purchase     50        60                   10000  +
-    WebStore Main       Add/Remove Items   20        60                   10000      +
-     +
-Note that in the above examplewe are using two models:  +
-  * WebStore Security - security testing for user registration and valid / invalid logins. +
-  * WebStore Main - main functional testing of WebStore application+
  
-We also plan to run certain scenarios (MCasesduring the load testing.+You can do so by opening each model and run the models (with 1 or more than one VUs).  As you open another model, be sure do not close the previous model.
  
  
Line 73: Line 68:
        
 ===== Load testing with Runtime Servers ===== ===== Load testing with Runtime Servers =====
 +
 +To generate a lot of load on AUT, you may need to run many instances of //TestOptimal// servers, which makes it harder to manage and control the load testing session.
 +
 +//Runtime// server is a licensed edition of //TestOptimal// server that can be managed by [[../server_manager | SvrMgr]] for large scale load / stress testing.
 +
 +[[../server_manager | SvrMgr]] also provides a central model deployment repository and model execution stats collection for all //Runtime// servers.  
 +
 +//Runtime// servers can be running on different OS or even on the cloud.
 +
 +
 +By using //TestOptimal// REST APIs, you can also build a concurrent model (model that uses Concurrent [[../sequencers | sequencer]]) to orchestrate model executions on //Runtime// servers (via [[../server_manager | SvrMgr]]) and thus automate your load testing by simply running the orchestration model.
 +
  
 ===== Load testing with cloud-based services ===== ===== Load testing with cloud-based services =====
  
 +There are cloud-based testing services for web application testing.  These cloud-based services offers an alternative to managing different OS and browser and even mobile device testing.
 +
 +Below is a few example of such services:
 +  * [[https://saucelabs.com/ | SauceLabs]]
 +  * [[https://www.browserstack.com/ | BrowserStack]]
 +
 +To connect to these services, you would use [[../plugins#webdriver_plugin | WebDriver plugin]] using the APIs provided by the online service provider.
 ===== Simulating production load ===== ===== Simulating production load =====
 +The first step in load testing is to determine the type of loads and how much you wish to exercise on AUT. Typically you would already have suite of models created for functional testing of AUT. These models when executed generates a specific type of loads on AUT.
 +
 +Carefully select a subset of these models that will generate the type of loads required and determine the number of virtual users for each selected models. You may use the following example to help you plan your next load testing:
 +
 +    Model Nam           MCase             VUs   Run Duration (min)   Thread Delay (ms)
 +    WebStore Security                      20        60                   15000 
 +    WebStore Main                         300       120                    5000 
 +    WebStore Main       Quick Purchase     50        60                   10000 
 +    WebStore Main       Add/Remove Items   20        60                   10000     
 +    
 +Note that in the above example, we are using two models: 
 +  * WebStore Security - security testing for user registration and valid / invalid logins.
 +  * WebStore Main - main functional testing of WebStore application
 +
 +We also plan to run certain scenarios (MCases) during the load testing.
 +
  
-===== Performance testing =====