Makes tests root session.
- runner loads root
conftest.js
if it is located on one level with each ofCONF.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 withtest
and ends with.js
; - inside each subfolder of each of
CONF.test.dirs
runner loadsconftest.js
file if it is present;
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.
-
<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. -
<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.
-
<inner> sessFunc()
-
Callback to create tests session.
It kills some processes before all if they are specified.