[83] LR test Accumulation

Source: Internet
Author: User
Tags list of attributes

I. Origin of hits per second/Throughput

1. click-through rate per second is the number of requests sent from the client to the server. That is to say, if the client enters the software system interface, all images and controls on the interface will be used as the number of clicks respectively.

2. throughput is the amount of data the server sends to the client, not the requests sent from the client to the server.

Ii. Iteration Methods

1. iteration number
The iteration number replaces the parameter with the current number of iterations.
2. Random Number
Random Number replaces the parameter with a random number. Specify the maximum and minimum values to set the range of random numbers.
3. unique number
Unique number replaces the parameter with a unique number. You can specify a starting number and a block size.

Iii. Use the correlated parameterization method in Iteration

Note: A carriage return must be included in the parameter text document.

1. After a parameter A is created, to associate another parameter B with it, select next row in the parameter table is set to the same line as

2. Settings

Figure 1

Figure 2

Iv. Standard Deviation std

Standard deviation (Std Dev, standard deviation)-statistical term.
A standard used to measure the degree to which data values deviate from the arithmetic average value. The smaller the standard deviation, the less the deviation from the average value, and vice versa. The size of the standard deviation can be measured by the rate relationship between the standard deviation and the average value.
Standard deviation formula: S = sqr (Σ (Xn-x dial) ^ 2/(n-1 ))
In the formula, Σ represents the sum, X represents the arithmetic average of X, ^ 2 represents the quadratic, and sqr represents the square root.
For example, a group of numbers are 200, 50, 100, and 200 respectively, and their standard deviations are obtained.
X dial = (200 + 50 + 100 + 200)/4 = 550/4 = 137.5
S ^ 2 = [(200-137.5) ^ 2 + (50-137.5) ^ 2 + (100-137.5) ^ 2 + (200-137.5) ^ 2]/(4-1) = [62.5 ^ 2 + (-87.5) ^ 2 + (-37.5) ^ 2 + 62.5 ^ 2]/3 = [3906.25 + 7656.25 + 1406.25 + 3906.25]/3 = 16875/3 = 5625
Standard Deviation S = sqr (5625) = 75

This value is used to measure the deviation between values of several points selected in the LR curve. If the deviation exceeds a certain standard, the software is too unstable.

V. SAP/SDP

SAP (Session announcement Protocol): Session notification protocol. Rfc2974 is mainly used to tell the receiver what to play more. No description format defined

SDP :( Session Description Protocol): Session Description Protocol. It specifies the format, that is, how to encode the required information of the session, but does not include the transmission mechanism and negotiation parameters. The SDP syntax uses text instead of ASN.1. An SDP Session Description starts with Session-level information and media-level information. If one appears, the other appears later.

6. Merge and associate Graphs

Associate the two graphs, and the data of one graph will affect the data of the other graph. This is called

Graph Association. For example, you can associate the running vuser diagram with the average transaction response time diagram to understand

The impact of a large number of vusers on the average response time of transactions.

1. Click "Running vuser" in the graph tree to view the running vuser diagram.

2. Right-click the running vuser graph and select merge graph ".

3. In the "select charts to be merged" list, select "average transaction response time ".

4. In the select merge type area, select join and click OK"

VII. Recording script method

1. sniffer method: uses the broadcast feature of Ethernet. Sniffer. However, the client and the server must be in the same network segment.

2. Proxy method (proxy): the client sends messages to vugen and then vugen sends messages to the server. LR is added between the client and the server.

8. The client always sends requests while the Server Processes

The records recorded by LR are consistent with the size of the tool Charles and the actual webpage file.

IX. recording mode HTTP/URL

HTML-Based Script (Browser/context sensitive) stores data of a page in a module.

URL (HTTP/analog) records the entire process between C/S.

Use of the two methods: web or B/S structure controls excessive flash, etc., should use HTML. Can be concentrated. Good readability. It is essentially the same.

Web_submit_form recorded in HTML

The URL is web_submit_data and supports controls.

10. Common Errors

1. The recorded script is empty, the recording fails, the Homepage cannot be opened, and so on:

Null: protocol selection error/non-B/S operation/When the page is opened, the page is retrieved from the cache and cannot be recorded/

Use proxy/ie use options/maliciousCode(Test tool: Ad-Award)/bofu firewall or anti-virus software

Recording error: Code view is used when an error occurs. Code can be recorded even if an error occurs, and tree view will stop recording.

Open the empty web page: vugen has a problem/LR installation path in Bin registe_vugen.bat (a re-registration may fix)

2. Script Error

11. protocol selection

In lr8, the single protocol HTTP sets a 7777localhost port in IE, and C and B are connected by 7777 to collect all information. In multiple protocols, the single-choice HTTP protocol is used, and the specified port is shot.

Protocol judgment tool: processspy (protocol used for. dll Analysis)

12. Association

It is the dynamic data generated from the server to the client. When the client sends a request, it needs to include the associated content to access the server again.

1. Automatic Association

2. Manual Association

Steps:

A) Select data returned by server in run time setting, and play back the script to check which scripts fail due to Association issues;

B) determine which data needs to be associated;

Error: Error-27979: requested form not found. This error indicates that the request sent to the server is invalid and cannot be found.

In this case, you can use the LR built-in tool: Compare with vuser ..., it can be found in tools. It can be used to compare the differences between two scripts. Note that when using this tool, it can only identify files with relatively short paths, no spaces in names, and no Chinese Characters in paths and names.

C) Find the left and right boundary values and locations of dynamic data;

D) add the web_reg_save_param parameter to the script.

Function web_reg_save_param ("Param name", <list of attributes> *, last)

"Param name" is the parameter name. list of attributes is divided into three parts: "lB =" "RB =" "ord =", which respectively refer to the left boundary, right boundary, and the first qualified boundary, the last one can be written as ord = All, meaning all are obtained. No last. When lb/Rb is written, the quotation marks must be escaped.

E) the dynamic values in the parameterized script in the script;

F) verify the correctness of the Dynamic Association.

13. Thinking time

No: The pressure is higher.

Yes: the pressure will be lower, but the actual waiting time will be better.

14.. Net memory Analysis

1. Stack -- place local variables, method parameters, return values, and other temporary values

2. managed heap: Level 0, level 1, and level 2. It is used to allocate hosted objects and is also the garbage collector area.

3. Unmanaged heap: used for running data structures, method tables, Microsoft intermediate language (msil), and jited code

The garbage collector only recycles the memory of the managed heap, And the stack is automatically released. The unmanaged heap is automatically controlled by the code in the unmanaged heap, And the managed heap may also leak the memory.

. NetCommon Performance Test indicators:

1. What is the exclusive memory of a process in process/private bytes and cannot be shared with other processes?

2.. Net CLR memory/# total memory used by bytes in all heaps managed heaps

3.. Net CLR locksand threads/# of Current Logical threads, the thread used during. Net Running. Note: The Memory Used in the thread is allocated in the stack.

Example:

A) 1. Don't let it grow. 2 does not change. It may be a problem with the performance of the unmanaged heap. Because the memory increases, the memory of the managed heap does not change.

B) 3 Growth, 1 growth, thread leakage, resulting in Memory leakage

C)

Stack memory leakage (stackoverflowexception)

Possible Cause of stack memory leakage:

1. Stack resources and never return method calls

2. Thread Leakage

Every time a stack is allocated, it is not recycled back, that is, the thread is leaked, and a stackoverflowexception exception occurs.

The size of the latest desktop and server version windows stack is 1 MB

3. managed heap memory leakage

Memory fragments of large pairs of images-if the application in the stack contains bytes, it will not be placed in the stack, but in the heap .. . NET will not perform compression processing, and will constantly apply for recovery. memory fragmentation may cause leakage.

Unnecessary root references

Middle-aged crisis

Use cleprofiler.exe,Continuously apply to collect large bytes for monitoring

15. lr decryption

Lr_decrypt: decrypts the encryption function.

Action ()

{

Char * STR = "ABC"

Char * str1;

Lr_load_dll ("encode1.dll") // load the dynamic connection library. encode1.dll is the. dll file name.

Str1 = (char *) crypt_encrypt (STR) // call the interface to put the character variable str in the. dll file. The crypt_encrypt // DLL file releases an Interface

Lr_output_message ("encrypted = % s", str1 );

Lr_out_message ("% s world", lr_decrypt (str1); // decrypt

For encryption, you need to use an external encryption method. You can use the LR tool or compile your own. dll file.

16. Write the wrong user name and password without errors

Add checkpoint

Right-click the location where you want to insert addstep/web_reg_find/Add search test/

File.

 

The web_find function searches the HTML page for the specified text string.

The web_reg_find function registers a request to search for a text string on the webpage retrieved by the next operation function (such as web_url ).

Web_global_verification is a registration function that registers a request for searching text strings on a web page, unlike web_reg_find, which only performs search in the next action function, it performs search in all subsequent action functions.

When using the web_find function, use "insert" after the search page ".

The "right" and "Left" parameters are for the text to be searched.

For example, to search for the Web tours site, the "right" should be "Web" and the "Left" should be "Site ".

Add another link, which is from ZeeArticleIt can be helpful to understand. Of course, most of the friends here are friends who are new to or have been unfamiliar with LR. You can learn a lot from Zee's blog.

17. The average, size, init, and end values in the summary and average transaciton Response Reports in analysis are not the same.
Solution: On the transaction page, adjust the set granularity value (right-click). The default value of summary is 20 seconds. You only need to change the value of transaction to 20 seconds.

18. If an error occurs during script playback or scenario file loading, it is likely that the storage path is incorrect, when saving, try to store it in folders without Chinese characters, spaces, uncommon characters, and non-Multi-Sub-directories. Thank you for your question and your persistent search for the answer.

Address: http://blog.163.com/mmhao_54/blog/static/69570810200801661727607/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.