Module: loader

Makes tests root session.

  • runner loads root conftest.js if it is located on one level with each of CONF.test.dirs;
  • if each of CONF.test.dirs is file with tests, runner loads and executes it;
  • if each of CONF.test.dirs is folder runner loads files inside recursive if file name starts with test and ends with .js;
  • inside each subfolder of each of CONF.test.dirs runner loads conftest.js file if it is present;
Source:

Methods


<inner> loadTests(dir)

Loads test files recursively. Test file name should start with test and end with .js.

Parameters:
Name Type Description
dir string

Folder with test files.

Source:

<inner> mainConftests()

Main conftests are loaded before tests session creation and may used for objects management, for example to created custom instance of global SS.

Main conftest is conftest.js file which is located on one hierarchy level with each specified tests folder or file.

Source:

<inner> preloads()

Loads special preloads files before main conftests and test files.

Preloads are specified in CONF.preloads array. It may be managed only programmatically and needs as extension point to load some custom files before tests.

After preloads it loads root (the mainest) conftest file, which may be set via CLI.

Source:

<inner> sessFunc()

Callback to create tests session.

It kills some processes before all if they are specified.

Source: