My log in tests keep crashing because Test Studio seems to cache information

1 Answer 198 Views
Test Recording
Brian
Top achievements
Rank 1
Brian asked on 26 Sep 2022, 07:08 PM

I have a very basic 'log into Telerik.com' test that I made. When I try to execute the test with Chrome it keeps crashing because I'm already logged in - so it can't perform the test of typing my name and password. However, my actual Chrome has had its cookies and histories and cache cleared. If I try to log in to Telerik with my Chrome browser, there's nothing saved. But when I run my test, there's all my old information, saved and cached. I even uninstalled Chrome and it's still happening.

 

So, where exactly is Test Studio storing this information, and how do I clear it without having to add a "clear cache" step to every test?

1 Answer, 1 is accepted

Sort by
0
Plamen Mitrev
Telerik team
answered on 27 Sep 2022, 11:43 AM

Hello Brian,

I will be happy to answer your question and share more details about Test Studio and its interaction with the browser. 

Test Studio uses a dedicated user profile for recording and execution in Chrome. It is different than the user profile that you see, when you start Chrome browser manually. The dedicated browser keeps the cookies and remembers your login in Telerik.com, so the test run skips this page and is not able to find the target element for user and pass input.

There are several ways to clear the cookies or configure your web test to run successfully across different machines and environments. Please find more details below.

  1. Add the "Clear Browser Cache" step to your test, before the page is loaded. This does not mean that you have to add this step in every test, but rather only when it is necessary. For example, if you reuse the "Login" test as a step in other tests from your project, you only need to add it there.
  2. You can add If -> Else logical steps and only enter the username and password, if a certain verification is successful. The verification is used as a condition in the If statement and the action steps should be inside that block.
  3. It is possible the clear the cookies on the user profile that Test Studio uses for automation. To do that, you need to start a recording session and while the browser that Test Studio started is still open, clear its cookies and history. The next time you run a test or start recording, there will be no cookies and you should land on the login page.

I hope the above details and suggestions are helpful to you. Let me know if you have any questions or concerns and I will be happy to continue this discussion.

Regards,
Plamen Mitrev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Tags
Test Recording
Asked by
Brian
Top achievements
Rank 1
Answers by
Plamen Mitrev
Telerik team
Share this question
or