You can see the same XSRF token, with the same value: Let's look at the View Results Tree element. If we run this script, we can see the same response that we have shown before, but in this case, from JMeter itself. In Step 1, we go to the main login page, and in Step 2, we log in to the page with a user and password. Let's suppose that your script looks like this: To do this, you can use the BlazeMeter recorder (a free Chrome plugin). So now, let's create a JMeter script for the Login step. If you are wondering what I'm using to see this information, well, I'm using Fiddler, but you can also see this using Charles or the Network tab of the Developer Tool of your browser. If we look into the traffic communication between the client (our browser) and the endpoint or server (), we can see there is a token given into the header of the response, as a cookie field. Let's use as an example login action of the BlazeDemo website (Make sure you register and also check the "Remember Me" option to log in successfully). This post will review how to do this with the Regular Expression Extractor. So, we need to find a way to do this easily in JMeter. For example, in cases where the following requests use these session IDs or tokens in their parameters (in POST requests for example). Sometimes, when scripting in Apache JMeter™, we need to work with them as variables. Tokens and session IDs are sent in the request header.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |