acceptance testing with codeceptjs
Introducing CodeceptJS
CodeceptJS is an acceptance testing framework with a special BDD-style syntax. Tests are expected to be written in ECMAScript 6. Each test is described inside a Scenario function with I object passed into it. I object is an actor, an abstraction for a testing user. I is also a proxy object for currently enabled Helpers.
By default CodeceptJS uses WebDriverIO helper and Selenium to automate browser.
As you know, Protractor is an official tool for testing AngularJS applications and CodeceptJS should not be considered as an alternative to Protractor but rather a testing framework utilizing this powerful library.
CodeceptJS provides scenario-driven approach, so test is just a step-by-step representation of real user actions. This way you can easily read, and follow test scenario, and edit it when you need it to be changed.
Example:
I.amOnPage('/login');
I.fillField('Username', 'john');
I.fillField('Password', '123456');
I.click('Login');
I.see('Welcome, John');
Quick Demo Project
Wanna see how Codecept with WebDriverIO works? Clone the following project Codecept Demo Project and follow the instructions.