4/16/16

Post-Recording and Try script

Post-Recording and Try script
After-Recording:-
Remember to do Four things….
1. Click on test plan and save the script with new name.
2. For Try Script you need to add View Result Tree.
Add (Thread Group) -> Listener -> View Result Tree
3. Add Cookie Manager and Cache Manager
Add (Thread Group) -> Config Element -> HTTP Cache Manager
Add (Thread Group) -> Config Element -> HTTP Cookie Manager
Do required setting in cookie and cache manager.
4. To comment by right click on the request and disable.
5. Customization (Add CSV file.)
Right click on thread group click ->Add -> Config Element -> CSV Data set Config
1. Create Data file at Bin folder of JMeter (Eg. Login.csv).
2. Make the setting as shown in below fig

















3.Change Variable name as follow:

























6.Parsing (Add regular expression extractor).
To check parsing you can use RegExp Tester in View Result Tree.



























7. Right click on request Add -> Post Processors -> Regular Expression Extractor














The special characters above are:
( and ) - these enclose the portion of the match string to be returned
. - match any character
+ - one or more times
? - don't be greedy, i.e. stop when first match succeeds

8.Adding Verification Point (Assertion)
Right click on request Add -> Assertion -> Response Assertion






















Adding ThinkTime:
Right click on Transaction controller  Add (Transaction controller) -> Sampler-> Test Action.

No comments:

Post a Comment