Interface test Tool-jmeter using notes (four: responding to assertions)

Source: Internet
Author: User

There are many types of assertions in JMeter, and I don't list them here, just the---I use to respond to assertions.

Function: An HTTP request is sent out, how to determine the success of the task performed? The task fails by checking that the server responds to the data, whether the expected data is returned, and if so, the task is successful.

1. How to add

Select a sampler, right-click Add, Assert, and select "Response assertion"

(1) Apply to

Regarding the scope of application, most of us tick "main sample only" is enough, because we have a request, essentially only one request. However, when we send a request, we can trigger multiple server requests, there is the main sample and sub-sample of the points.

(2) The response field to be tested

Tick "Response text" to verify in the response data.

(3) Matching rules

Tick "include", meaning that if the corresponding data contains the field to be verified, the task succeeds.

(4) the mode to test

That is, the data value that needs to be verified.

2. View running Results

(1) Failed tasks

View results Tree Task result color red when judging for task failure.

(2) Successful tasks

To determine the success of the task, view the result tree task result color green.

Interface test Tool-jmeter using notes (four: responding to assertions)

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.