LiveModeRunner Object

An object that configures and launches test tasks in live mode. In this mode, TestCafe watches the test files, and restarts the tests when you make changes.

Use the testCafe.createLiveModeRunner function to create a LiveModeRunner.


const createTestCafe = require('testcafe');

const testcafe   = await createTestCafe('localhost', 1337, 1338);
const liveRunner = testcafe.createLiveModeRunner();

await liveRunner

await testcafe.close();

LiveModeRunner is a Runner class descendant and provides the same API (with certain limitations).



A TestCafe server can create only one file system watcher that tracks changes to test files.

This implies the following limitations:

  • You cannot create multiple live mode runners for a single TestCafe server instance.
  • You cannot call the method more than once for a single LiveModeRunner.

In rare cases when you need multiple live mode sessions running in parallel, you can create several TestCafe server instances.