Using Cookies
Using Cookies
Add cookies to a request in your load test when the page or API you test needs them, for example a session cookie or an authentication token. LoadFocus sends them with that request.
Add a cookie to a request
- In the request you are configuring, click Cookies. The number next to it shows how many cookies the request has.
- Click Add cookie.
- Fill in the four fields:
- Name:
token - Value:
djs34567ajdlasjdklas765756kjdas(the cookie value, such as an authentication token) - Domain:
example.com(the domain the cookie applies to) - Path:
/or/my_folder/(the path the cookie applies to)
- Name:
- Click Add cookie again for more cookies, or the trash icon at the end of a row to remove one.
Cookies are set per request. If several requests in the test need the same cookie, add it to each of them.
What it is useful for
- Testing pages and endpoints that need a logged-in user, by sending a session cookie or token.
- Testing user-specific content, such as preferences or a shopping cart, by sending the cookie that identifies that user.
- Sending cookies for different subdomains, using the Domain field.
The cookie form has no fields for flags such as Secure or HttpOnly.