Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.66 KB

File metadata and controls

50 lines (33 loc) · 1.66 KB

Codeceptjs-Cucumber

CodeceptJS E2E framework with Cucumber and Saucelabs

npm License

About

This is the E2E framework with CodeceptJS and Cucumber. Integrates with Sauce Labs, uses Should.js assertion library. Runs cross-browsers tests in Parallel on SauceLabs.

Run

Run all tests:

    yarn acceptance

Run one test:

    yarn acceptance --grep @tag

Run test on firefox:

Default browser is chrome

    yarn acceptance --grep @tag --profile firefox

Soft Assertions

Collect all errors with Soft Assertions!

Soft Assert collects errors during scenario. Soft Assert does not throw an exception when an assert fails and would continue with the next step after the assert statement. If there is any exception and you want to throw it then you need to use softAssertAll() method as a last statement in the scenario or with @after hook and it will report all the failures at once.

The detailed example is in Github Sample Search Tests.

const verify = require('soft-assert');

// in test
verify.softAssert('actual-1', 'expected-1', 'message');
verify.softAssert('actual-2', 'expected-2', 'message');

// at any point throw all errors at once
verify.softAssertAll();

For more info, follow the soft-assert library!