Create a Web test plan

Source: Internet
Author: User
Tags http cookie

Learning to create a basic test plan for testing a Web site will create 5 users to send requests to two pages. Each test needs to run two times.

So, the total number of HTTP requests = 5 (number of users) x 2 (2 requests) x 2 (Repeat send 2) + 20 HTTP requests

To build a test plan, you will use the following elements:

    1. Thread Group
    2. HTTP Request
    3. HTTP Request Defaults
    4. Graph Results
1 adding users

Add Thread Group

The first step is to add a thread group, which tells JMeter the number of users to impersonate, how often the user sends the request, and how much the user sends.

Right-click the test plan:

Note that you need to modify the default property values. Click the thread Group you just created:

    • Name: Thread Group names
    • Number of Threads (number of users): quantity of users sending requests
    • Ramp-up Period (interval s): Tell JMeter to start all users for a total of time, if the user set 5 here for 5 seconds, then 1 seconds to start a user, if set to 0 all start these users at the same time
    • Loop Count: Repeats the number of times that the test plan is repeated, without checking forever otherwise it will always be executed

Note: These values have been modified to take effect immediately! The above values have been modified to take effect immediately! The above values have been modified to take effect immediately! Do not need to press save.

The following changes are followed:

2 Adding a default HTTP request

We've defined our users, and now it's time to define the tasks they need to perform.

Right-click the thread group you just added:

Next, check the added element configuration property

Name: Setting names

Web server ' s server NAME/IP: All HTTP requests are sent to the same server (in this case, jmeter.apache.org), this example only fills in this one field

The setup is complete as follows:

The HTTP request default does not allow JMeter to send HTTP requests, but defines the default values that are used for HTTP requests.

3 Adding support for cookies

Usually all Web tests should support cookies. Add an HTTP Cookie manager to each thread group.

To add support for cookies:

4 Adding an HTTP request

Send two requests: http://jmeter.apache.org/and http://jmeter.apache.org/changes.html

JMeter will send the request in the order in which they appear in the tree.

The first one:

Name: Names

Path: route, set here to/(to ensure that the full address is configured in the HTTP Request Defaults element)

The second one:

Create a Web test plan

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.