Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

Performance Testing login into web page

Solved 1 Answers 60 Views
0 1

By Record Script option i record the process of login into a webpage

After the record script is completed, i try to run the process in jmeter, But when i run the process it's not entering into the webpage (i,e login fails), Then i copied the api of login functionality

and generate the token and i created HTTP Header Manager and i added


"Authorization"   "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImFsbEBuYWFuYWwuaW4iLCJ1c2VybmFtZSI6ImFsbCIsImV4cCI6MTUxNTc0MzA1MSwidXNlcl9pZCI6MzB9.GNoUVKT8aYhpKCLIyct-8h2YmIBrGqgbRkoiUH2AUDs"

after adding this i run the process it successfully login into the application.

My Qus is

1) This is the correct way or there's some other way ?

2) how to create multiple user's with different login ?

1 Answer

Best answer
Your application have some authentication

not an issue sometime token is required and you add in your script.Sometime, certificate also required which you have to add in setting

Now, come to your question,

1> Yes, this is correct way, if your application have provide some authentication , you can easily ask to developer it they remove it or not,If not then you have to add token

>> use corelation -add -regular expression extractor

2>For multiple user with different login , you have to use parametrization (thread group-add- csv data set config file)

>>In which you add user with different username & password and save it in bin folder of your apache jmeter software and pass the directory url in "csv data set config"  and when you make script note down you have to user same username & password.
answered by (748 points)
selected by
commented by (188 points)
Thank you @Bharat
I will try this one and let you know ..
commented by (748 points)
Sure, its definitely work it
commented by (188 points)
It's working fine ..
But  instead of using regular expression extractor i use json  extractor to get the token
I config csv data for multiple user's
Thanks for your help .
commented by (748 points)
Good, now your script work fine
commented by (188 points)
yeah .........
working fine ....

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.