1.0.3

1.0.2

1.0.1

1.0

CodeceptJS hits first stable release. CodeceptJS provides a unified API for web testing for Webdriverio, Protractor, and NightmareJS. Since 1.0 you can also test mobile applications in the similar manner with Appium.

Sample test:

I.seeAppIsInstalled("io.super.app");
I.click('~startUserRegistrationCD');
I.fillField('~email of the customer', 'Nothing special'));
I.see('davert@codecept.io', '~email of the customer'));
I.clearField('~email of the customer'));
I.dontSee('Nothing special', '~email of the customer'));

We also introduced two new helpers for data management. Using them you can easily prepare and cleanup data for your tests using public REST API.

Sample test

// create a user using data factories and REST API
I.have('user', { name: 'davert', password: '123456' });
// use it to login
I.amOnPage('/login');
I.fillField('login', 'davert');
I.fillField('password', '123456');
I.click('Login');
I.see('Hello, davert');
// user will be removed after the test

Next notable feature is SmartWait for WebDriverIO, Protractor, SeleniumWebdriver. When smartwait option is set, script will wait for extra milliseconds to locate an element before failing. This feature uses implicit waits of Selenium but turns them on only in applicable pieces. For instance, implicit waits are enabled for seeElement but disabled for dontSeeElement

Changelog

Special thanks to Andrey Pshenkin for his work on this release and the major improvements.

0.6.3

Scenario('My scenario', { build_id: 123, type: 'slow' }, function (I)

those options can be accessed as opts property inside a test object. Can be used in custom listeners.

0.6.2

const actor = require('codeceptjs').actor;

0.6.1

0.6.0

Major release with extension API and parallel execution.

Instead of: codeceptjs run tests use:

# load config and run from tests directory
codeceptjs run -c tests/

# or load codecept.json from tests directory
codeceptjs run -c tests/codecept.json

# run users_test.js inside tests directory
codeceptjs run users_test.js -c tests

0.5.1

0.5.0

0.4.16

0.4.15

0.4.14

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);
}
I.say('I am going to publish post');
I.say('I enter title and body');
I.say('I expect post is visible on site');

0.4.13

Feature('Complex JS Stuff', {retries: 3});

Scenario('Not that complex', {retries: 1}, (I) => {
  // test goes here
});
Feature('Complex JS Stuff', {timeout: 5000});

Scenario('Not that complex', {timeout: 1000}, (I) => {
  // test goes here
});

0.4.12

codeceptjs run -o '{ "bootstrap": "bootstrap.js"}'
codeceptjs run -o '{ "helpers": {"WebDriverIO": {"browser": "chrome"}}}'

0.4.11

0.4.10

module.exports = function(done) {
  // async instructions
  // call done() to continue execution
  // otherwise call done('error description')
}

0.4.9

0.4.8

0.4.7

0.4.6

0.4.5

0.4.4

0.4.3

// inside codecept.conf.js
exports.config = {
  // contents of codecept.json
}

0.4.2

0.4.1

0.4.0

0.3.5

codeceptjs def

to generate steps definition file and include it into tests by reference. By @kaflan

0.3.4

0.3.3

Fixed global installation. CodeceptJS can now locate globally located modules. CodeceptJS is also recommended for local installation. Depending on installation type additional modules (webdriverio, protractor, ...) will be loaded either from local or from global path.

0.3.2

0.3.1

0.3.0

Breaking Change: webdriverio package removed from dependencies list. You will need to install it manually after the upgrade. Starting from 0.3.0 webdriverio is not the only backend for running selenium tests, so you are free to choose between Protractor, SeleniumWebdriver, and webdriverio and install them.

0.2.8

0.2.7

0.2.6

0.2.5

0.2.4

0.2.3

0.2.2

Fixed generation of custom steps file and page objects. Please replace require('codeceptjs/actor') to actor in your custom_steps.js. Whenever you need to create I object (in page objects, custom steps, but not in tests) just call actor();

0.2.0