How to do I create a scenario with multiple scripts in Apache JMeter as we do in LoadRunner Controller?
Apache JMeter is a single component tool which has element based scripting feature. Unlike LoadRunner, JMeter does not have separate tools for scripting, scenario creation, test execution and result analysis. Although different elements are used to fulfil the purpose of test scripting and scenario creation.
Apache JMeter has a parent element named ‘Test Plan‘ under which you can add multiple thread groups. Each thread group represents a scenario or business flow. Refer to the given figure:
In case, these thread groups have common settings like cookies, header, application URL etc. then you can add related elements at the Test Plan level which are applicable to all the thread groups.
Another situation is combining of multiple JMeter test scripts (prepared under different Test Plan) into a single test script. To perform the combining operation, you can use the ‘Merge’ option and combine the scripts.
File -> Merge
Likewise, you can create a performance test scenario with multiple JMeter test scripts and execute the test.
Execution of Test
The execution of the test is again too simple. If you want to execute all the scenarios simultaneously then keep unchecking ‘Run Thread Groups consecutively (i.e. one at a time)’ option in the Test Plan.
In case, you want to execute thread group one-by-one then tick mark this option.