Mr. Cockroach's 0 basic learning software test LR notes

Source: Internet
Author: User

Common terminology for performance testing

number of concurrent users : number of online users interacting with the server

Request Response Time : The entire time that a request is made from the client to the response. Typically includes response time for network response time +server

Transaction Response Time : The time it took to complete the office. This is a key indicator of performance testing

throughput Rate : The amount of data transferred per unit of time over the network. This is the main measure of network performance

TPS: The number of transactions per second that the system can handle.

Click -through Rate: The number of HTTP requests sent per second, the larger the click-through rate, the greater the pressure on the server

Resource Utilization : The use of different resources, such as the server's CPU, memory and so on.

LR Catalog Analysis

Understanding the need for directory results after software installation

Learning the use of a software should start with the most basic structure-its directory.

Analysis templates-Analytical templates

bin-executable program, note the CHM help document inside

bincerts-Security Certificate

classes-jar packages that may be used

dat-configuration, backup and other information

Related jar packages for EJBCOMPONENT-EJB

help-Help Center

include-header file (you can write a custom function, save as the header file of. h and put it in this directory, and then only need to call this header file can be easily used)

Samples-java

tutorial-examples of Quick start

webtours-Instance Web site

LR Interface Analysis

Virtual User Generator

Note: Vugen can only record sessions on the Windows platform, but recorded vuser scripts can be used on Windows as well as on Linux

How to create a new script

New single Protocol Script

New Multi-Protocol script

Create a new script with a recently used protocol

Protocol type

Application Deployment Solution: Citrix ICA

Client/server

Custom

Distributed components

Electronic commerce

Enterprise JavaBean:

Erp/crm

Legacy: terminal emulation (RTE)

Mail Service:

Middleware

Data flow

Wireless

Task Mode

Give you step-by-step tips, just follow the prompts to proceed to the next step

For beginners for LR

recording Options Options

Taking single protocol http/html as an example

    1. Menu Tools->recording Options Enter the recording setup form
    2. Recording tab: Which recording method to use
    3. Browser tabs: Browser selection
    4. Recording Proxies tab: Proxy settings on the browser
    5. Advanced tab: You can set think time for recording, supported character set standards, etc.
    6. Correlation tab: Manually set up associations to save dynamic values during test execution. Use these settings to configure the degree of Automatic association that Vugen performs during the recording process.

run-time Setting Options (in VUser red stands for commonly used

    1. Run Logic: Use to set the action part to run repeatedly several times
    2. Pacing: Used to set how one way to start the next iteration
    3. LOG: Set whether logging is enabled
    4. Think time: Settings for Think time in scripts
    5. Miscellaneous: Configuring additional Run-time settings
    6. Speed Simulation: Used to simulate network speeds
    7. Browser emualation: Setting browser emulation properties
    8. Proxy: Set Agent

Controller

You can use LR to manage and maintain scenarios

LR can be easily and effectively controlled from a single point of control for all VUser

Create a run scenario

Create Manual: You can generate manual scenarios by creating and developing scripts, load generators, and the number of vuser that are included in each group. You can also define the total number of vuser that you want to use in your scenario by using percent mode, and assign a load generator to each script and a percentage of vuser for the total.

To be aware of:

    1. The duration setting overrides the VUser iteration setting. This means that if the duration is set to 5 minutes, then VUser will continue to run as many iterations as possible in five minutes, even if the run-time setting specifies only one iteration at a time.
    2. VUser group settings do not apply to percent mode.

Create a target-oriented

    1. In a goal-oriented scenario, you can define the test targets that you want to implement, and LR will automatically create a scenario for you based on the defined goals
    2. In a goal-oriented scenario, you can define the target of the V type: Number of virtual users, clicks per second (web VUser only), number of transactions per second, number of pages per minute (web VUser only), or transaction response time for a scenario
    3. Use the Edit Scenario Target dialog box to define a scenario target
    4. Note: To define the number of transactions per second or transaction response time target type, the script must contain transactions. For each target type, you can define the transactions that you want to test in the script.

Scenario Settings

    1. In the Scenario Settings tab, you can set the length of time that the scenario will continue to run after it reaches the target, and whether the scenario can continue if it fails to reach the target.
    2. After reaching the target, run: Sets the length of time the scenario will continue to run after the target has been reached.
    3. If you cannot reach your goal: Select one of the following two options:

A Stop the scenario and save the result: If you cannot reach the target you defined, instruct the controller to stop the scenario and save the scenario results.

B Continue to run the scenario without reaching the goal: instruct the Controller to continue running the scenario even if the set target cannot be reached.

Running Scenarios

1. When you run the scenario, the VUser group is assigned a load generator and executes their vuser script. During the execution of the programme, LR will:

Record the duration of the transaction defined in the VUser script

Execute the collection included in the VUser script

Collect VUser generated errors, warnings, and notification messages

2. When the scenario runs, you can monitor each vuser, view errors generated by VUser, warning and notification messages, and stop the VUser group and brother VUser. You can instruct LR to allow VUser in a single vuser or group to complete their running iterations before they are stopped, to complete the operations they are running before stopping, or to stop running immediately

Results setting

Results-results Setting settings

Recommended results name name is: Scene run time _ script name _ Number of virtual users _ scene duration

Monitoring Scenarios

1. You can use the LR runtime, transactions, Web resources, system resources, network latency, firewall server resources, Web server resources, Web application server resources, database server resources, streaming media resources, ERP/CRM server resources, Java performance, Application deployment and middleware Performance Monitor to monitor scenario execution.

2. LR provides the following online monitors: The run-time monitor shows the number and status of VUser participating in a scenario, and the number and type of errors generated by VUser. A user-defined data point graph is also provided that shows the real-time values of user-defined points in the VUser script.

About System Resource monitoring

1, one of the main factors affecting the response time of the transaction is the system resource utilization

2. Using the LR Resource Monitor, you can monitor Windows, UNIX, SNMP, antaraflame Thrower, and SiteScope resources on your computer while the scenario is running, and you can determine why bottlenecks occur on a particular computer.

Analysis Basic Knowledge

1. Create a session

When you run the scenario, the data is stored in the result file with the extension. lrr.analysis the display information and layout settings for the activity diagram are stored in files with the. LRA extension.

2. start analysis

LR Selects the "Analysis" program. Can be opened from a controller.

3. Finishing Results

After the scenario is executed, these results are automatically collated or merged, and the results of all hosts are transferred to the results directory. By selecting result > Auto collate Results in the Controller window.

Understand Analysis Report

    1. After you run the scenario, you can view the reports that summarize the system performance. Analysis provides reporting tools: summary reports, HTML reports, transaction reports
    2. The summary report is based on general information about the operation of the programme. You can view the summary report from the Analysis window at any time
    3. You can instruct analysis to create an HTML report. Analysis will create an HTML report for each open diagram.
    4. The transaction report provides performance information about the transactions defined in the VUser script. These reports provide you with a breakdown of statistical information about the results and allow you to print and export data.

Analysis Analysis Basics

    1. View summary. It is mainly the number of virtual users and transactions.
    2. View system resource conditions for the load generator and server. such as CPU, memory and so on. Often memory leaks are manifested in high CPU utilization.
    3. View virtual users and transactions
    4. To view the occurrence of an error
    5. View Web resources and segment pages

IP Deception,

Setup method:

    1. Lr-tools-ip Wizard
    2. Enable IP spoofing in the controller's scenario (must enable IP spoofing before connecting to load generator)
    3. Tools-expert mode
    4. Tools-options-general
    5. Releasing the IP after testing is also done in the LR-TOOLS-IP Wizard

Tips:

    1. Must be a fixed IP, does not support dynamic IP
    2. Use Ipconfig–all to view IP information after restarting the computer

LR Common Terminology

Scene

The main manifestation in LR is the user scenario in the controller that designs and executes the test case. The main work is to select a virtual user script in the controller, set the number of virtual users, configure the behavior of the virtual user runtime, select the load generator, set the execution time, and so on.

Load generators

The real machine used to generate the pressure, controlled by the controller, allows the user script to be executed on different hosts. In performance testing work, a controller controls multiple load generator to pressurize the system under test.

Virtual user

for real users in real life, users using LR impersonation are called virtual users. Its essence is to simulate the behavior of real users through virtual user scripts.

Virtual User Script

scripts that are recorded or developed through VUser Generator. These scripts are used to impersonate the user's behavior.

Transaction

LR Measures the performance of the server through transactions. A business transaction is usually a user's one or a series of actions that represent a certain function, while the program behaves as a block of code. Testers can define one or more action steps as a transaction to measure the user concurrency response time for this part.

Think Time

The concept introduced in order to simulate the actual behavior of the user more closely. In practice, the user will often do a series of operations, such as browsing the Web content, and the process of the server is no pressure. Therefore, in a virtual user script, a function lr_think_time (double time) is used to simulate the user process, and the user thread waits when the function is executed.

Meeting Point

corresponds to the concurrency point in the real user. LR achieves true concurrency through rendezvous points. The collection point corresponds to the function lr_rendezvous (constchar* rendezvous_name) in the virtual user script, which is executed according to the concurrency policy of the scene when executing to the function.

Transaction response Time

is a statistic, is an important parameter to evaluate the performance of the system. Once a transaction is defined, the response time of the corresponding transaction can be seen in the scene execution and test result analysis. By analyzing the execution of critical or core transactions, you can quickly locate performance issues.

HP WEB TOURS Analysis

    1. 1. start Web Tours

Start-lr-sample-web

Start by serving the Web tour.

Then open the Web Tours Web site

If the Web server is started, the server will get an error when it starts

    1. 2. Homepage Structure

Test case considerations for the Login page, test point considerations

    1. 3. Book your ticket

LR Recording test Scripts

Description of the recorded business process

Login

Flight, select the following information: Departure City: Denver (default), Departure date: Keep default, reach City: Los Angeles, return date: Keep the default setting, seat preferences: aisle

The rest remains the default, click Continue

Go to the Select Flight page, keep the default settings, and click Continue

Enter billing information and book a flight: Enter in the credit card: 12345678 in the output date, enter: 10/08, click Continue

Go to the invoice page and display your invoice information

Click the Voyage button on the left to view the information

Finally click Sign Off

Save File as Basic_turorial

Recording Scripts

Start Vugen

Enter URL

Recording according to Business process

View Scripts

The tree view and script view can be used to view scripts after successful recording

LR return test Script

Set Run time settings

1.Vuser-----run-time Settings

2. Run iteration number set to 2

3. "Step" is set to random (random)

4. "Log" Select Extended log and Output parameters

5.think time default, it will be set in the controller

Real-time observation of returning images

Tools - General Options

Playback scripts

After the above setup is complete, we can click the playback button to play back the script.

View Results

1.view-test Result

2. The filter allows you to select the results that meet the conditions you set

Web ( http/html ) Two ways of recording the Protocol ( Tools - recording Options - recording )

1. Basic principles of script recording

Take full account of script execution efficiency: The performance test script focuses on how to simulate the user's real behavior. Therefore, the script used for testing should be close to the user's real action. This is the requirement that the recorded script do not add too much content during the modification, especially if it does not reduce its efficiency. For example, try not to add loops, checks, and so on, unless these operations are necessary.

Record important user business: To record common, frequently used business to test, do not record everything in one brain.

Choose what you want to record: In a Web performance test, if some of the actions are not affecting the transactions that the user is interested in, you can do so without recording. For example, in some query transactions, the request process to select a query criteria page may not be recorded, but for some procedures to pass query parameters, you must record.

Correct configuration of parameters prior to recording

2. HTML and the URL based script Introduction

Html based script : You can generate a separate function for each user request.

URL based script : You can capture all HTTP requests sent to the server as a result of user actions, and then log them down. It sets up the ability to capture non-HTML applications, such as small programs and non-browser applications.

The script recorded in HTML is intuitive, easy to understand and maintain. The URL-generated script looks more long.

3. principles for choosing a recording method

    1. Browser-based applications recommend the use of html-based script
    2. url-based script is not recommended for browser-based applications
    3. If the browser-based application contains JavaScript and the script generates requests to the server, such as the paging button for the DataGrid, it is also recorded using the Url-based method.
    4. The HTTPS security protocol is used in browser-based applications and is recorded using the Url-based method
    5. For beginners, if the HTML recording is unsuccessful, it can be changed to a URL-mode recording.

4. HTML based script Settings Introduction

    1. a script used to describe the behavior of the user. Directly created URL(web_url), form submission (web_submit_form), connection ( Web_link ) and images ( Web_image ) and other functions

2. Only explicit URL scripts are included. In this script, all links, image requests, and URL operations are recorded as Web_url functions, while form submissions are recorded as Web_submit_data functions.

Mr. Cockroach's 0 basic learning software test LR notes

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.