Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:load_testing [2020/12/31 19:10] admin |
tutorial:load_testing [2021/01/05 03:00] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
Learning Objectives: | Learning Objectives: | ||
- | * Virtual Users (VUs) | + | * [[#Virtual Users (VUs)]] |
- | * Model execution with VUs | + | * [[#Model execution with VUs]] |
- | * Multi-model execution | + | * [[#Multi-model execution]] |
- | * Load testing with multi-browser | + | * [[#Load testing with multi-browser]] |
- | * Load testing with Runtime Servers | + | * [[#Load testing with Runtime Servers]] |
- | * Load testing with cloud-based services | + | * [[#Load testing with cloud-based services]] |
- | * Simulating production load | + | * [[#Simulating production load]] |
- | * Performance testing | + | |
Line 20: | Line 20: | ||
A model is executed with one or many VUs. In the web application / website load testing, VU is used to simulate concurrent users. | A model is executed with one or many VUs. In the web application / website load testing, VU is used to simulate concurrent users. | ||
- | Unlike typical load testing tool which submits pre-designed http packets or scenarios, // | + | Unlike typical load testing tool which submits pre-designed http packets or scenarios, // |
===== Model Execution with VUs ===== | ===== Model Execution with VUs ===== | ||
- | When you execute a model, it uses one VU by default. | + | When you execute a model, it uses one VU by default. |
+ | |||
+ | {{wiki: | ||
+ | |||
+ | Set the field " | ||
+ | |||
+ | You can also change how fast you want to ramp up the VUs by setting the " | ||
+ | |||
+ | 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 " | ||
+ | |||
+ | When running the model with IDE, be sure to select " | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Multi-model execution ===== | ||
+ | |||
+ | Each model describes a set of behavior (requirements, | ||
+ | |||
+ | If you have more than one models created to test your AUT, you may want to run these models concurrently to expose your AUT to various types of activities described by these models. | ||
+ | |||
+ | 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. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Load testing with multi-browser ===== | ||
+ | |||
+ | Selecting which browser to use to run load testing is done in the scripts, for example: | ||
+ | | ||
+ | |||
+ | You may replace above script with the following to randomly choose a browser to run the testing for each VU: | ||
+ | | ||
+ | |||
+ | If you wish to have more " | ||
+ | | ||
+ | |||
+ | If you run the models through [[../ | ||
+ | | ||
+ | |||
+ | where " | ||
+ | |||
+ | |||
+ | |||
+ | ===== Load testing with Runtime Servers ===== | ||
+ | |||
+ | To generate a lot of load on AUT, you may need to run many instances of // | ||
+ | |||
+ | //Runtime// server is a licensed edition of // | ||
+ | |||
+ | [[../ | ||
+ | |||
+ | //Runtime// servers can be running on different OS or even on the cloud. | ||
+ | |||
+ | |||
+ | By using // | ||
+ | |||
+ | |||
+ | ===== Load testing with cloud-based services ===== | ||
+ | |||
+ | There are cloud-based testing services for web application testing. | ||
+ | |||
+ | Below is a few example of such services: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | To connect to these services, you would use [[../ | ||
+ | ===== 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 | ||
+ | WebStore Security | ||
+ | WebStore Main | ||
+ | WebStore Main Quick Purchase | ||
+ | WebStore Main | ||
+ | |||
+ | 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. | ||
+ | |||