codeceptjs
Advanced tools
Changelog
0.6.2
config
object to public APIindex.js
to include actor
and helpers
, so they could be required:const actor = require('codeceptjs').actor;
output
directory if it doesn't existChangelog
0.6.0
Major release with extension API and parallel execution.
run
. To specify path other than current directory use --config
or -c
option:Instead of: codeceptjs run tests
use:
# load config and run from tests directory
codeceptjs run -c tests/
Changelog
0.5.1
getAttributeFrom
for custom attributes by @robrkerrselectOption
by @robrkerr. [Se PR.pressKey
method by @romanovmaChangelog
0.5.0
waitTimeout
by @HughZurname. See #391. Resolves #236* Dockerized CodeceptJS setup by @artiomnist. See referenceChangelog
0.4.16
keepCookies
option to keep cookies between tests with restart: false
.waitForTimeout
config option to set default waiting time for all wait* functions._test
hook for helpers by @cjhille.Changelog
0.4.14
_beforeStep
and _afterStep
hooks in helpers are synchronized. Allows to perform additional actions between steps.Example: fail if JS error occur in custom helper using WebdriverIO:
_before() {
this.err = null;
this.helpers['WebDriverIO'].browser.on('error', (e) => this.err = e);
}
_afterStep() {
if (this.err) throw new Error('Browser JS error '+this.err);
}
Example: fail if JS error occur in custom helper using Nightmare:
_before() {
this.err = null;
this.helpers['Nightmare'].browser.on('page', (type, message, stack) => {
this.err = `${message} ${stack}`;
});
}
_afterStep() {
if (this.err) throw new Error('Browser JS error '+this.err);
}
codecept list
and codecept def
commands.I.say
method to print arbitrary comments.I.say('I am going to publish post');
I.say('I enter title and body');
I.say('I expect post is visible on site');
restart
option added. restart: false
allows to run all tests in a single window, disabled by default. By @nairvijays99resizeWindow
command.windowSize
config option to resize window on start.Changelog
0.4.13
Feature
and Scenario
to rerun fragile tests:Feature('Complex JS Stuff', {retries: 3});
Scenario('Not that complex', {retries: 1}, (I) => {
// test goes here
});
Feature
and Scenario
to specify timeout.Feature('Complex JS Stuff', {timeout: 5000});
Scenario('Not that complex', {timeout: 1000}, (I) => {
// test goes here
});
uniqueScreenshotNames
option to set unique screenshot names for failed tests. By @APshenkin. See #299clearField
method improved to accept name/label locators and throw errors.clearField
method added.waitForElement
, and waitForVisible
methods.resizeWindow
by @norisk-itChangelog
0.4.12
--override
or -o
option for runner to dynamically override configs. Valid JSON should be passed:codeceptjs run -o '{ "bootstrap": "bootstrap.js"}'
codeceptjs run -o '{ "helpers": {"WebDriverIO": {"browser": "chrome"}}}'