In response to the assertion assertion Jmeter 02 Jmeter

After reading the blog post, I believe we should be able to use the Jmeter send an HTTP request. Since it is then we want to test, we certainly need to determine the results. Jmeter response to data requests provides several mechanisms assertion here say something about some of the more common assertion.

In response to the assertion

We assert that the response should be regarded as the most convenient and the most commonly used performance consumes less asserted, it can cover most of the basic data we determine the response of the interface, we were still on an article in the second interface example .

Url: https://data.cma.cn/weatherGis/web/weather/weatherFcst/getCurrentCondition

HTTP Method: Post

Request:
staId: 54511

Response:
{"v01301":"54511","v13003":71,"v12001":24.3,"v13011":0.0,"v11292":229.0,"v11293":1.6,"v20003":5.0,"d_DATETIME":2019,"d_IYMDHM":1566792218000,"d_RECORD_ID":2.08712269E9}
  • Add a response assertion

  • Enter the case you want to judge the
     example we want to determine whether the response text is correct, you can add a field to test the response text matching rules, patterns in response to assertions included.

  • View Results
    assertion result of the response data contains 54511: The

    response data includes the results of the assertion of 545,111, (due to the response data does not include the 545,111, the response asserts on the error):

Of course, in response to the assertion of the response is determined not only text, but also determines response code , the response information , a response header and the like, in addition to determining whether comprise also possible to determine whether the match whether equal the like.

Guess you like

Origin www.cnblogs.com/ezrealli/p/11414745.html