jmeter common logic controller (transaction controller, loop controller)

jmeter is very powerful, vowing to defeat postman

One, transaction controller

        1.1 Opening method:

        Right mouse button) Thread Group ---> (mouse hover) Add ---> (mouse hover) Logic Controller ---> (left click) Transaction Controller. As shown below:

        1.2 Detailed explanation of parameters

        We will see 2 check boxes in the controller. Let’s see what this box does. We will introduce its trial scene later, as shown in the figure below:

        Generate parent sample :

        Unchecked: When unchecked, it will be the same as the usual http request execution. When we view the results through the aggregation report, there will be as many results as there are http requests, complementary intervention

        Check: Count the http requests under the logical processor as a whole. When we aggregate reports or other monitoring functions, we only see one piece of data, even if you add 100 http requests under the processor , it is also counted as one in statistics

        lnclude duration of timer and pre-post processors in generates sample:

        Unchecked: nothing

        Check it: the problem is coming. When we execute it, we may add some timers and wait for some time-consuming plug-ins. However, does this time belong to the execution time of the interface? Of course not, but when After you check it, jmeter will count this time as the execution time of the interface, so if there is no special requirement here, don’t choose it.

         1.3 Usage scenarios:

        Here I will not talk more about the role of lnclude duration of timer and pre-post processors in generates sample application scenarios, so I will not go into details here. I will focus on another one.

        Let me make an analogy here. For example, your boss wants you to count how long the shopping process of the interface will take. What should you do? Do you execute each interface first and then add up the time? Brother, it’s too troublesome , Create a transaction controller, add shopping cart, select products, place an order, etc., put these interfaces under the controller and treat him as a business, or directly, as an interface, and then execute it, which is not easy Song?

Second, the loop controller

        2.1, Opening method

        Right Mouse Button) Thread Group ---> (Mouse Hover) Add ---> (Mouse Hover) Logic Controller ---> (Left Click) Loop Controller. As shown below:

        2.2 Detailed explanation of parameters

        There are only 2 parameters in it. If you check forever, the request under the controller will be executed all the time. If you don’t check forever and choose to enter a number, then the request under the controller will be executed according to the number of times you input. Very simple controller. Wide range of application scenarios

         Brothers, I just ask that I will update some jmeter information in the follow-up blog post, let everyone know that jmeter is not worse than postman, and it is slower to beat Postman! ! ! !

Guess you like

Origin blog.csdn.net/m0_58002043/article/details/125220901