Local and Session Storage, Cookies | Bondar Academy
Course: AI-based testing with testRigor
Module: Advanced Tricks and Techniques
Instructor: Artem Bondar
Lesson Summary
In this lesson, we explore how to interact with browser session storage , local storage , and cookies using Test Trigger to optimize test execution. Key Concepts Test Application: The lesson uses the Conduit QA app to demonstrate the process. Login Process: When logging in, a JWT token is stored in the browser's local storage, allowing the user to bypass repeated logins. Steps to Optimize Test Execution Log into the application and observe the storage values. Use a reusable rule to obtain the access token . Save the access token in local storage under the name JWT token . Utilize the set item method to store the token. Reload the browser to apply changes. Example Code setItem("JWT token", storedValue.accessToken); By implementing these steps, the test execution time decreased from 7 seconds to 4 seconds, demonstrating significant optimization. Conclusion In summary, we performed programmatic authentication by saving the access token in local storage. Remember to reload the browser after making changes to ensure they take effect. For further information, refer to the Test Trigger documentation for additional prompts related to cookies and storage management.