Jmeter —— Test Fragment

Test Fragment (test sequences)

  1. 1.    concept

Test Fragent JMeter of: the controller is a special thread group; it in the test tree thread group in the same level . However, when using the needs and the Include the Controller (including the controller) or Module1 the Controller (Controller Module) complexes. Its main role is modular test procedure, function is similar to java. Test package into the upcoming test fragment can be directly referenced elsewhere.

 

  1. 2.    Creating

1) On the "Test Plan", right click and select "Test Fragment" can be added.

2) add the HTTP request in Test Fragment below.

3) Save the script.

 

 

 

  1. 3.    Example a: Include Controller

1) Create a new test plan, adding "thread group", and then add components: Include Controller, you will be introduced to the previously saved script. In this way, in other places (eg, where the thread group), there is no need for each test scripts are written logged in, but encountered when the login script to be modified, only you need to modify the Test Fragment to reduce the workload.

2) Add the result tree: See the results.

3) Include Controller: understood as external calls.

 

 

 

  1. 4.    Example Two: Module Controller

1) Create a test plan: add a thread group. Add a Test Fragment outside thread group, add a login request.

2) in the thread group, adding components: Module Controller. Select below in FIG Run Module To the Test Fragment can. When you select will be highlighted.

3) Module Controller: call understandable as internal.

 

Guess you like

Origin www.cnblogs.com/little-little-bai/p/11240035.html