Sampler Controller and Module Controller
Context: You want to group sampler/requests together, easier to reuse and maintain again all your samplers.
We order our Samplers in a specify scenario such as:
- Sign-up / register
- Sign-in (Using again and repeatable)
- Flight Booking
Sampler Controller
- To group some sampler or requests into a simple controller.
- Easy to manage all requests / samplers in a feature or functions of an application.
Module Controller in JMeter
- Support us to control group of requests should be run before run other group of requests.
- Example: We should run some requests for accessing /home and /login before run some requests for adding items to carts, purchasing your order
Test Fragments
- Simmilar to Simple Controller, however it will be disable default.
- It is used to collect sample like a simple test controller.
- We can use modular to invoke samples in a test-fragment instead of using simple controller. It helps us easier to manage our sampler in our test plan.
- We can export a sampler as a Test Fragment and save as a JMeter file. Then, we can import a test fragment into a JMeter test plan.
How to add a test fragment
Export a sampler as a Test Fragment file
Include controller
- We can use include controller to import any test fragment as a jmeter file
- It helps us to reuse the sampler from other test fragment.
- In a project, we can maitain all sampler in all test plans easily and effectively.
Reference lists
Here is the list of offical links from JMeter
- Sampler Controller: https://jmeter.apache.org/usermanual/component_reference.html#Simple_Controller
- Module Controller: https://jmeter.apache.org/usermanual/component_reference.html#Module_Controller