Version Logger API

The version logger API allows you to access the framework’s version number in your tests, test runner files, and other code.

Reference the framework’s version number in code

Import the version constant from the TestCafe module to reference the version number in your code:

import { version } from 'testcafe';
console.log(`TestCafe version: ${version}`);

API version

Reference the framework’s version number in a custom reporter

To access the framework’s version number in your custom reporter, reference the first argument (version) of the init method:

init (version) {
   this
      .write(`Using TestCafe ${version}`)
      .newline()
}