To record a web application, first we need to setup a web test plan in jmeter by adding test elements.
In my previous post, we have learnt about how to open jmeter to record a web application. After starting jmeter, by default there will be two elements "Test Plan" and "Work bench".
What is Test Plan?
It contains all the test elements which will be a part of test execution. Your scripts, test data files, codes and logic all are children for test plan.
What is Work Bench?
Work bench is the place where non test elements can be kept. Whatever you keep inside, Jmeter will ignore them during test execution.
Follow the below steps to set up a web test plan:
Here you need to understand one thing. How many transactions controllers do we need to add?
Well answer to this question comes from "Which scenario are we recording". Let's say if I'm recording a scenarios where user need to launch the URL, Login and click on profile then logout, I need to add 4 transaction controllers.
How to understand?
An application may have hundreds of functionalities, Out of them any one end to end process would be a scenario. Each scenarios contains different steps/actions in it such as launch, login etc, So each step in a scenario is a transaction.
Now,
That's it you have added all the required test elements to start the recording.
In my next post we will discuss about each test element in detail.
In my previous post, we have learnt about how to open jmeter to record a web application. After starting jmeter, by default there will be two elements "Test Plan" and "Work bench".
What is Test Plan?
It contains all the test elements which will be a part of test execution. Your scripts, test data files, codes and logic all are children for test plan.
What is Work Bench?
Work bench is the place where non test elements can be kept. Whatever you keep inside, Jmeter will ignore them during test execution.
Follow the below steps to set up a web test plan:
- Add a thread group to the test plan. You can get it from Test plan >> Threads >> Thread Group
- Add a HTTP cache Manager to the thread group (you added it in the step 1). You can get it from Thread Group >> Config Elements >> HTTP Cache Manager
- Add a HTTP cookie Manager to the thread group (you added it in the step 1). You can get it from Thread Group >> Config Elements >> HTTP cookie Manager
- Add a HTTP Request defaults to the thread group (you added it in the step 1). You can get it from Thread Group >> Config Elements >> HTTP Request defaults
- Add a transaction controller to the thread group. You can get it from Thread Group >> Logic Controller >> Transaction controller.
Here you need to understand one thing. How many transactions controllers do we need to add?
Well answer to this question comes from "Which scenario are we recording". Let's say if I'm recording a scenarios where user need to launch the URL, Login and click on profile then logout, I need to add 4 transaction controllers.
How to understand?
An application may have hundreds of functionalities, Out of them any one end to end process would be a scenario. Each scenarios contains different steps/actions in it such as launch, login etc, So each step in a scenario is a transaction.
- After adding multiple transaction controller add one view results tree. You can get it from Thread Group >> Listeners >> view results tree
Now,
- Add Test script recorder under work bench. You can get it from Work Bench >> Non Test Elements >> Test Script Recorder
- Add one view results tree. You can get it from Thread Group >> Listeners >> view results tree.
This is how it looks:
That's it you have added all the required test elements to start the recording.
In my next post we will discuss about each test element in detail.
No comments:
Post a Comment