Skip to content
This is a small example of a working codeceptJS test project using allure as test reporting tool
JavaScript Gherkin Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
features
fragments
gherkin_definitions
helpers
pages
test_steps
tests
.gitignore
README.md
codecept.conf.js
jsconfig.json
package-lock.json
package.json
runTest.sh
runTestInParallel.sh
steps.d.ts

README.md

codeceptJSExample

Preface

This is a small example of a working codeceptJS test project using allure as test reporting tool.

I have created this example while evaluating codeceptJS.

I'm working on OSX and have not tested whether any of this works on Windows or Linux.

Installation

I assume you have installed nodeJS, mpn and allure on your computer. Once you have done this, the rest is easy

  • clone this repository

  • open a console in the cloned repository and type:

    npm install
    npx codeceptjs run --steps --plugins allure
    allure serve output
    

The installation should start. After installation is finished three tests should be executed. Finally the allure server should start and open a browser window presenting the test result.

Intention

With this example I want to show how to code tests using most features codeceptJS provides.

  • The tests will open the german version of wikipedia and will search for an article
  • All tests will do the same but using different approaches
  • One test step is very simple just coding the flow
  • With another test I want to show how to use fragments and steps
  • The third example is coded using Gherkin

Advanced features

  • In "./helpers/puppeteer_helper.js" you can find examples on how to code helpers for puppeteer.

  • Running tests in parallel works like this:

    npx codeceptjs run-multiple --steps --all  --plugins allure
    allure serve output/*
    
  • The Gherkin tests are executed first and are not executed in parallel to the rest of the tests

References

Tools

Youtube tutorials

Enjoy

You can’t perform that action at this time.