I am new to JMeter and learning, practicing using the Regular expression extractor.
I have created a test plan using the recorder. I have added a regular expression extractor as i want to get the text "Your Account" from my webpage into a variable.
I use the debug sampler to check if my variable has got the value "Your Account" in there. I am seeing the default value "your_account_NONE" in the variable when i run the test.
I think my regular expression is wrong. Please advise, help. Thanks.
I know I am on the correct page when the test runs because i have inserted a Response Assertion, pattern to test is set to "Your Account" The assertion passes. If i change to pattern to "Your Accounttttttttttt" The assertion fails. So I am on the correct page. I would like to get the value "Your Account" into a variable.
My regular expression has the following config:
Reference Name: YourAccount
Regular Expression: <h1>"Your " <span>Account</span> </h1>
Template: $1$
Match: 1
Default Value: your_account_NONE
My test plan is as follows:
Test Plan
Thread Group
Http Request defaults (Server Name: a URL to go to homepage)
Recording Controller
Http Cache Manager
Http Cookie Manager
Http request (sign in)
http request (Homepage)
Regular Expression Extractor
Response Assertion