3

I have a test suite that takes ~ 10 minutes to run in BrowserStack (Automate). If a test case fails, it is challenging to find where in the recorded video the failure occurs. Having the fixture name and test name visible in the bottom of the browser helps with scrubbing through the video, but having some kind of chapter marker would be really helpful. I noticed that something in my tests is spitting out links with start buttons into the Text Log but I'm not sure what is actually causing it. Is there a way to do this on purpose?

Update with picture of what I'm talking about: logs

Alex Skorkin
  • 4,034
  • 3
  • 21
  • 44
  • 1
    Testcafe uses JS API (https://github.com/browserstack/api) which does not provides Selenium like functionality – Mukesh Tiwari Nov 09 '18 at 18:04
  • Yes I know that, I found that in other SO answers vaguely about this. What I'm saying is, my test runs do put things in the Text Log without me doing anything (see the picture I meant to attach originally). What is causing this to happen, and how can I do it on purpose? – Samantha Blasbalg Nov 09 '18 at 20:02

1 Answers1

2

The Text Log on BrowserStack shows Selenium commands executed by the browser during a test session. Since TestCafe doesn't use Selenium to perform test actions it must be clear in ideal conditions, but BrowserStack will terminate the session that doesn't send any command within 90 seconds (IDLE TIMEOUT). So TestCafe retrieves the current URL every 80 seconds to work around this timeout.

To help you identify problematic tests in a recorded video, you can modify TestCafe reporters (e.g., the default spec reporter) to print a precise timestamp when a test starts. You can also modify the BrowserStack browser provider to execute custom Selenium commands that will be added to the Text Log on BrowserStack.

Also, you can create a proposal in the TestCafe repository about improving test logs on BrowserStack. If it receives enough votes, the TestCafe team will consider its implementation.

Andrey Belym
  • 2,852
  • 5
  • 17