What is the use of regular expression in jmeter?

Answer Posted / darshan36

With regular expression we can pass username or password "Dynamically".
Expression is (.+?)
Example- Consider a login credentials has username as Admin and password as Super. If in case the credentials are hard-coded with the above values and if credentials are changed than the entire script will fail. In order to avoid we use username =(.+?) and password=(.+?)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you ensure re-usability in your jmeter scripts?

335


Explain what is test fragment?

329


What are pre-processor elements? List some of the pre-processor elements?

326


Explain what is samplers and thread groups?

317


What is distributed load testing? How can it be achieved?

325






What are the differences between jmeter & loadrunner?

364


What are the types of a processor in jmeter?

317


What is the role of timer in jmeter?

322


Explain how you can reduce the resource requirement in jmeter?

316


Explain where you can use functions and variables?

325


What are the major differences between jmeter and load runner.

364


Is it necessary to call embedded resources explicitly in jmeter?

322


Explain how you can capture the script of the authentication window in jmeter?

333


How to reduce the resource requirement in jmeter?

327


What are the important plugins supported in jmeter?

322