saving cookies/session between tests

1 Answer 12 Views
Test Execution
Bill
Top achievements
Rank 1
Bill asked on 23 Jun 2025, 09:00 PM

asp.net application - doesn't seem to keep cookies after test.

Trying to run tests separately.

Test Sequence:

login: creates asp.net session cookies

select company: depends on asp.net session cookies and create a company cookie

select employee: depends on asp.net session cookie and company cookie

How do I keep the cookies and/or keep the browser open between running individual tests ?

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 25 Jun 2025, 08:45 AM

Hello Bill,

Automation tests are expected to be complete standalone scenarios which can be executed instantly on any machine. With this in mind it is expected that each test starts with a login sequence and ends up with a logout one. 

if you want to create more complex scenarios where various workflows are covered in the time of one user session, you can explore the option to reuse tests as steps. That way you can keep one set of steps which covers specific part of the application and reuse it across the different logins. And while calling steps in the same test the browser session remains the same. 

Have a look on this suggestion and let me know if you have any further questions or doubts. Thank you for your cooperation in advance.

Regards,
Elena
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Test Execution
Asked by
Bill
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or