A physical browser that accesses a website maintains application session persistence until it is closed. After the browser is restarted and navigated to the same website, a new application session will be established. A website session is controlled by one (or more) HTTP session cookies, so a new session means a new value of the cookie. In StresStimulus, a VU can either restart a browser on every iteration (the session cookie will change on every iteration), or leave the browser open across all iterations (the session cookie will stay the same on every iteration). Maintaining session persistence across all iterations can be useful when a test case has a login process that needs to be done only on the first iteration and not on subsequent iterations.

Here are two examples:

StresStimulus can emulate a user base that includes both of these user types. Use the VUs restarting the browser % to set the percentage of VUs that will be restarting the browser on every iteration and change the session. The rest will keep their browsers open and have their session persist across all iterations. For example, a value of 0 for VUs restarting the browser % will render session persistence for all VUs across all iterations; a value of 80 will disable session persistence across iterations for 80% of VUs and enable it for 20% of VUs.
Note: Session persistence within an iteration is always maintained.