jmeter http request thread group + + + assertion Affairs

Brief introduction

jmeter is a very powerful software, you can do the test you want to any test, although some will be very complex, and agreement on jmeter, it supports http, https, mq, ftp, etc. a lot of agreement. We are able to test for the web, a lot of test test app, applet testing. The general asked in the interview test scenario is that numerous test cases. It is referred to performance tests in the test scenario.

 

Thread group to know the contents

Threads: the number of users, such as setting operation is performed with Example 10 had 10 users.

ramp-up: Start number set by the user how many seconds

Cycles: Set the number of threads, the number of loops 

 

Simple get request

Let's add a thread group, then right-cat Ning store, add a listener -> View Results Tree

 

Adding an assertion

Assertion is to determine whether the use cases through, where I added value of success, where if not true, then it will fail with this use case does not pass

Note: the request must be placed below

 

Simple post request

  • Fill in the login information of the post, if it is json format data in the message body, if not on the right of the key parameters used in the form of transport
  • To assert the use cases to determine whether the login is successful
  • Add http header Manager, part of the requirements document will be limited to the interface type to be added here
  • Add the result tree, view the results
  • Garbled, add postprocessor -> post processing -beanshell processor enter the following command to run again to resume
prev.setDataEncoding("utf-8");

 

Transaction Controller

  Services is one thing, in order to collect performance metrics from multiple testing procedure, such as a single function, there are several operations, view product -> Add to Cart -> Billing -> pay. If you want to collect the settlement to pay for these two important indicators of performance, you need to use the transaction

  • Login for more information and to establish a request to add assertions NOTE: If you log in is form-data requirements must click on the following Gogo
  • Add -> Logic Controller -> transaction controller, the controller in the test request transaction pulled
  • Run, remember, the transaction controller is a controller error transaction would be wrong

 

 

Guess you like

Origin www.cnblogs.com/cheneyboon/p/11877078.html