Git Product home page Git Product logo

puppeteer-jest-es6-docker's Introduction

Application for running api or end-to-end automated tests in jenkins using puppeteer, jest, docker

build or pull image

docker build --network=host -t mhuretski/puppet-jest-es6 .
docker pull mhuretski/puppet-jest-es6

start in jenkins

1. Create pipeline

2. Specify repository from SCM

3. Run job

start in nodejs locally

npm test --forceExit --runInBand --
--ENV_TO_CHECK=<LOCAL> --BUILD_NUMBER=<BUILD_NUMBER> <SPEC> --CHECK=<UI> --SCREENSHOT=<SCREENSHOT> --debug
<LOCAL> - local environment (options: LOCAL DEV STAGE PROD)
<BUILD_NUMBER> - specifies folder for output
<SPEC> - specifies filename pattern to run 
    options: 
    - TEST - all patterns are executed
    - SPEC UI PERF - only files with those names are executed
    - API - pattern for files: api rest soap
<UI> - specifies how to check, preconditions are different
    for example, 'UI' is executed with browser, when API does not
    options: 'UI', 'API', 'REST', 'SOAP', 'SPEC', 'PERF', 'TEST'
<SCREENSHOT> - specifies whether to make screenshots
--debug - run non-headless
Example
npm test --forceExit --runInBand -- --ENV_TO_CHECK=LOCAL --BUILD_NUMBER=100 spec --CHECK=UI --debug --SCREENSHOT=true
Simplified Example
npm run local
In docker
docker create --name=LOCAL_TEST_SPEC \
  -v $(pwd)/result:/app/result \
  -v $(pwd)/src:/app/src \
  -v $(pwd)/tests:/app/tests \
  --user $(id -u):$(id -g) \
  --network=host \
  mhuretski/puppet-jest-es6 \
  npm test \
  --silent \
  --forceExit \
  --runInBand \
  -- \
  --ENV_TO_CHECK=LOCAL \
  --BUILD_NUMBER=100 \
  SPEC \
  --CHECK=SPEC \
  --SCREENSHOT=true
IDE scope setup pattern:
file:tests//*&&(file:*ui.ts||file:*spec.ts||file:*api.ts||file:*soap.ts||file:*rest.ts||file:*perf.ts)

puppeteer-jest-es6-docker's People

Contributors

mhuretski avatar

Stargazers

 avatar Artem avatar Pavel Belousov avatar

Watchers

James Cloos avatar Pavel Belousov 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.