LoadRunner- Summary (IV)
directory
-
1, the Run – Time Setting
-
2. Connect different DB modes
-
3. State of virtual user during execution
-
4. Main performance indicators
1, the Run – Time Setting
(1) Run Logic
This is where the script is set up and the order in which each Action is run.
Run Logic provides two modes of operation: Sequential and Random. Iterations set the number of Iterations on the Run.
Set Run Logic to Sequential mode and Iterations to 2. All scripts under Run Run from top to bottom. A loop will also appear on Run.
If Random mode is selected, all scripts under Run are randomly selected and Run based on their respective set ratios. The Run flag will have an extra percentage symbol. You need to set the properties separately for each Action under Run, changing their percentages.
Random is a convenient way to generate some simulation of Random user behavior. For example, if you need to simulate that the user has a 40% chance of unregistering and a 60% chance of logging in, you can easily solve this problem by running the Action randomly in Run Logic.
Blocks are an interesting feature that provides the function of a script Block for hierarchical composition of scripts. By clicking the Insert Block button on the right, a script can be added to a Block, and scripts can be added to a Block, each Block can be run in a sequential/random manner, and the number of cycles can be set on the Block, so that a variety of complex scripts can be run.
(2) Pacing
Configure the wait time between iterations of a script run. If you need to do something periodically in a script, you can do it at Pacing.
Pacing is executed according to the Iteration of the script, which means that the Pacing setting is checked every time Starting Iteration or Ending Iteration occurs.
As soon As the previous iteration ends
By default, there is no wait time between the previous iteration and the next iteration.
2. After the previous Iteration ends
Here you can set how long to wait for the next Starting Iteration after the current Ending Iteration script. There are two ways, one is fixed, which refers to the fixed waiting time, and the other is random, which refers to the random waiting time within a certain range.
For example, if you want to simulate Posting a post and wait 5 minutes before Posting the next post for 50 posts, you can make the post an Action by setting 50 iterations on Run and then setting fixed to 300 seconds.
3. At(provided that the previous iteration ends by that time)
The difference is that Pacing is the time between the previous script’s Strating Iteration and the next script’s Starting Iteration. The fixed or random mode can also be set. If you want to simulate a user Posting 50 posts every 5 minutes, you can make the posts an Action by setting 50 iterations on Run and then setting fixed to 300 seconds.
Add: The difference between the two ways
With refers to the time between the previous Ending Iteration and the next Starting Iteration.
At refers to the time between the previous Starting Iteration and the next Starting Iteration, so At contains the execution time of the previous Iteration.
In At mode, if the execution time of an iteration is longer than that of Pacing, the system prompts that the set time of Pacing cannot be reached. The script runs the next iteration immediately without waiting, which can be used to verify whether the processing time of an iteration is within the expected threshold.
(3) Log
This option provides a basis for debugging analysis, as playback validation of scripts is often done by logging.
Logs are classified into the following two types:
Standard Log
Extended Log
1. The Parameter substitution
The parameter assignment operation is output as a log (output is blue).
2. Data returned by the server
Output the requests returned by the server as logs.
3. The Advanced trace
Advanced trace logs.
(4) Think Time
Think Time is a way of waiting Time. Since VuGen playback scripts run at full speed, while real users do not operate so quickly, it is necessary to add waiting Time to simulate the user’s waiting operation during the running of the script.
(5) Additional attributes
Lr_get_attrib_string () allows you to customize parameters by entering common parameter names and their corresponding values, similar to constants.
For example, here we add a parameter named test with a value of 123456.
(6) Miscellaneous
1. Error Handling
In VuGen, an error in a function in a script causes the script to stop running, but it will Continue running in a scenario because of the Continue on Error option. Generate snapshot on error supports error screenshots. It is recommended not to enable Continue on Error and Generate snapshot on error at the same time during load. This will greatly reduce load efficiency. Fail Open Transactions on Lr_ERROR_message Indicates that when the lr_ERROR_message function appears in a transaction, the transaction status of the function is set to Fail.
2. Multithreading (Load process and thread Settings)
The mmdrv.exe process is used to simulate virtual users. Each virtual user uses the mmdrV. exe process. In thread mode, all virtual users use the thread of mmdrv.exe to run scripts. In the choice between process and thread, thread simulation users consume less resources to generate load, but sometimes load errors will occur. The process is relatively stable, but the resource cost is high.
3. Automatic Transactions
A transaction is a function of how long an action takes. In LoadRunner 11 this option is not selected by default, whereas in previous versions each Action was set to one transaction by default. Because Action is a combination of actions rather than a single Action, novice users often misunderstand Action times, leading to confusion about response times in performance test results.
(7) Speed Simulation
Provides bandwidth emulation options. By default, scripts are accessed at maximum bandwidth. As a LAN, downloading images and even videos is very fast. If you set bandwidth limits, the response time you get is much closer to the real user experience.
For example, if you set the bandwidth to 128Kb/s and run the script again, you will notice that the script is running much slower than before.
(8) Browser Emulation
With the Change user-Agent property, you can simulate scripts to various browsers, making them ideal for browser compatibility testing. In this case, you can not only set the type of browser simulation, but also set whether to simulate the Cache processing method, so as to realize the real situation that the first access is slow and the next access is fast. When two identical requests are executed within a script, as you can see in the log, the latter request completes faster than the former request because the Cache mechanism does not download the corresponding non-resource file (similar Cache mechanisms exist on servers).
For example, if you write two identical requests in a script, you can see in the log that Resource “XXX” is in the cache already and will not be downloaded again. The request has been cached and will not be downloaded. The Body byte of the entire request becomes smaller.
In the setup dialog, Simulate a New User on each Iteration is a special option. Iteration is a concept I mentioned earlier. When this option is turned on, VuGen clears all the context before each iteration to simulate a new user doing the iteration. The web_cleanup_cookies function can achieve the same effect.
Clear cache on each iteration Is used to Clear the corresponding cache in each iteration to simulate the effect of a new user’s first visit. If you need to clean the Cache manually, you can use the web_cache_ cleanup function to prevent subsequent requests from being cached.
(9) the Preferences
1. Checks
Turn on picture and text check support. After this option is set, the system supports the web_find() and web_image_check() functions to check images and text during playback. This option is usually disabled to save system memory because it focuses on performance tests rather than functional tests.
2. Generate Web performance Graphs
This option is used to set whether to monitor page performance counters during playback. Hits per Second and Pages per Second data are available in the scene only when this option is selected.
3. The Advaced
1) WinInet Replay instead of Sockets (Windows only)
By default, scripts are played back over Sockets ports. In some cases, this will be rejected by the server, so use WinInet’s engine instead.
Internet Explorer is also based on WinInet, so compatibility is better, but WinInet does not support UNIX (i.e. load generation servers can only be installed on Windows platforms). On the other hand, the engine cannot count the number of connection users and connection bandwidth normally in thread mode.
2) File and line in automatic transaction names
Whether the system automatically adds a unique transaction name when a new script is added.
3) Non-critical resource errors as warnings
In recorded scripts, most requests take an EXTRARES parameter. After the parameters will have some resource file link address, VuGen function will verify whether the request after the request to return EXTRARES corresponding resources, under the relevant address if modify the address of the related resources, script playback will find server even without returns the relevant picture resource script also won’t go wrong. If you want the script to fully validate every page request and associated resource throughout the entire access process, you need to disable this option at this point.
If an ERROR occurs in a resource file, an ERROR is displayed instead of a Warnings warning.
Advanced Options is important because it provides all the Options for setting HTTP requests, including the time limit for HTTP timeouts, and the format for sending and receiving requests.
(10) Download Filters
The Download Filters function is designed to help us block specific access to the scripts when playback. The following Filters are used to filter the scripts: To solve the problem of cross-server data impact in page reading.
Filtering rules include URL, Host, and HostSfx.
The URL is for a fixed address, cannot be wildmatched, can only write a fixed address.
Host is a Host, you can write a Host name to filter all content under that Host name.
HostSuffix is reinforced, just write the domain name back end of the server to filter all the preceding content.
(11) Data Format Extensions
Compared to this feature in the recording option, this is much simpler. This function is related to the new correlation function of LoadRunner 11. If you need to use the new correlation function, you need to turn this function on.
2. Connect different DB modes
3. State of virtual user during execution
4. Main performance indicators
Transaction Performance Summary
The smaller the drop, the smaller the fluctuation of response time. If the drop is large, the system is not stable enough.
Transaction Response Time Under Load
The smoother the data line, the more stable the system.
Transaction Response Time (Percentile) (Percentage of Transaction Response Time)
The smoother the data, the smaller the change in response time.
Transaction Response Time (Distribution) (Number of transactions per Time period)
The more transactions in a class with a smaller response time, the better.
Hits per Second
The clicks per second provides a record of the clicks generated on the system during the current load. Each click is equivalent to a request to the server, and the number of hits increases as the load increases. The larger the number, the better.
Throughput (Bandwidth usage)
The smaller this value is, the less bandwidth the system is dependent on, and this value can be used to determine whether there is a network bandwidth bottleneck (note that the unit used here is in bytes).
HTTP Responses per Second
This number is usually the same as clicks per second. Clicks are the number of requests made by the client, while HTTP responses are the number of responses returned by the server. If the number of responses returned by the server is less than the number of clicks sent by the client, the server is unable to answer connection requests that are overloaded.
Retries Per Second
Indicates the number of server connections retried due to active disconnection by the server. The lower the value, the longer the connection release on the server side. The resulting situation may be as follows:
A. The initial connection is unauthorized
B. Require proxy server authentication
C. The server closes the initial connection
D. The initial connection fails to connect to the server
Connections Per Second
Broken connections and new connections, so that users can know the current number of connections to the server per second.
The larger the number of concurrent connections is, the larger the connection pool of the server is. When the number of concurrent connections stops rising as the load increases, the connection pool of the system is full and more users cannot be connected. Usually, the server returns a 504 error. You can solve this problem by changing the maximum number of connections to the server.
AllTests software tests
Share software testing, automated testing, performance testing, test development and other technical articles and resources, welcome to pay attention to!