Skip to main content

Introduction

In certain scenarios, you might want all the steps to be executed in the same session. However, in other scenarios, you might want to clear the session and the cookies before certain steps.

How Sessions Work in Endtest

When you execute a Web Test, a real browser is started, and the instructions from your test are executed in that browser. All the test cases from that Web Test will be executed in the same browser session, one after another. This means that if the test performs a login in your web application at some point, it will stay logged in until the end of the entire test execution. After the test execution is completed, the browser and the session are cleared, and the data is deleted from the machine on which the test was executed.

How to Clear the Session

In some scenarios, you might need to clear the session and the cookies. There are different methods in the Miscellaneous action that you can use:
  • Delete Cookies
  • Clear Local Storage
  • Clear Session Storage

Sessions for Sending API Requests

When using the Send API Request action, the API requests do not get sent from the browser. Those API requests are sent from outside the browser. This means the session information for those API requests is not stored in the browser. More details about that are provided in the Sessions and Cookies section of that chapter.

Permanent Storage in the Endtest Vault

You may encounter scenarios where a test execution needs to store information that can be retrieved by a different test execution. For example, one test execution might store a unique value generated by your web application, and another test execution might need to use that unique value. This can be achieved by using the Endtest Vault.