![]() ![]() (1) Duration: control the duration of the test, with the unit of second. The scheduler configuration can control the execution time of thread groups more flexibly If this option is checked, threads are created when they are needed. Sets the number of loops per thread in the thread group before endingīy default, all threads are created when the test starts. If the ramp-up value is set small and the number of threads is set large, it will put a lot of stress on the server at the beginning of the test. For example, if the number of threads is set to 10 and the ramp-up time is set to 100 seconds, JMeter will use 100 seconds to start and run 10 threads, and each thread will start 10 seconds after the previous thread was started. The ramp-up time is used to set the time required to start all threads. Multiple threads are used in the test to simulate concurrent access to the server. The number of threads is the number of concurrent users, and each thread will run the test plan completely independently without interfering with each other. Stop Test Now: the entire test execution will be stopped immediately, and currently executing samplers may be interrupted. ![]() ![]() Stop Test: the entire test will be stopped after all currently executing threads have finished the current sampling.Stop Thread: stops executing the current thread without affecting the normal execution of other threads.Start Next Thread Loop: ignore the error, terminate the current loop of the thread, and execute the next loop.Continue: ignore errors and continue execution.The following configuration items control whether the test will continue to be executed or not when an error is encountered. In the interface, the thread group can be configured as below: The interface of thread group is shown in the following figure: During the execution of one thread, the variable of the current thread will not affect the variable value of other threads. Each thread is independent and does not affect the others. A thread group can be regarded as a virtual user pool, in which each thread can be understood as a virtual user, and multiple virtual users perform the same batch of tasks at the same time. All samplers and controllers must be placed under a thread group. The Thread Group is the beginning point for all test plans. Next, we will introduce them separately and describe the main components in detail. The test components in JMeter generally have the following categories: thread group, sampler, logic controller, listener, config element, assertion, timer, pre-processor and post-processor. In the test plan, you can configure user-defined variables called by components in the whole test plan, as well as thread group behavior, library files used in test, etc.īy using various test components in the test plan, you can build rich test scenarios. The JMeter script tree takes the test plan as the root node, and all test components will be included in the test plan. JMeter's test script is presented in the form of 「tree」 in the interface, and the saved test script jmx file itself is also in xml format. In this article, we will further introduce JMeter's rich components to help you build test scripts for complex scenarios. In the previous article of this series, we introduced the open-source test tool JMeter and took a simple HTTP test as an example to see the capabilities of JMeter. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |