Git Product home page Git Product logo

coge2e's Introduction

Cognifide logo

@Cognifide E2E config

Cognifide default setup for Puppeteer and Protractor tests.

Installation

$ npm install @cognifide/e2e --global

Usage

$ coge2e init

Running this command will init setup and allow to select which configuration should be added.

Protractor setup

Running the tests

To run test with default configuration:

npm run test

There are two ways to run Protractor tests on specific environment: one way is to add another parameter --params.env [env_name]. List of available environment you an find in /data/env.json. The second way, easiest, is to run specific npm script: by default, configuration comes with 4 environments:

  • local - default environment which is tested when npm run test is executed
  • dev
  • staging
  • prod

In order to run tests on, for example, on prod environment simply run npm run test:prod

npm run test --params.env staging
/* or */
npm run test:staging

Real life example:

npm run test
    --suite homepage
    --exclude tests/analytics/homepage.js
    --params.env prod

/* or */

npm run test:prod
    --suite homepage
    --exclude tests/analytics/homepage.js

How to write Protractor tests

Puppeteer & Jest setup

Running the tests

Similar to Protractor config, default configuration comes with 4 default environments:

  • local - default environment which is tested when npm run test is executed
  • dev
  • staging
  • prod

Tests can be run on specific environment by running scripts like npm run test:prod. The only difference is that it's not possible to pass arguments like --params.env prod to the script, so trying to run npm run test --params.env prod will result in error. The only acceptable arguments are those that are available for Jest CLI options.

How to write Puppeteer tests

License

MIT

coge2e's People

Contributors

jplucinski avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.