Code Monkey home page Code Monkey logo

test-app's Introduction

test app

Build Status Saucelabs Ststus Coverage Status JavaScript Style Guide

This repo has been wrote some test for front end developer easily to learn how to test and test with CI/CD.

๐Ÿ‘‰๐Ÿ‘‰๐Ÿ‘‰ You can get full tutorial about how to start this project from zero on medium.

  • Lint test
  • Unit test
  • Functional test
  • Visual test
  • Run test on TravisCI

Quick Start

CLICK ME
  1. Fork this repo & make sure you have been install nodejs.
  2. clone repo from your account
$ git clone https://github.com/<YOUR_GITHUB_ACCOUNT>/test-app.git
  1. Then run these script to setup website. ๐Ÿ‘‡
# move to test-app dir
$ cd test-app

# install dependency
$ npm install

# launch website
$ npm start
  1. Sign in Travis CI with github account
  2. Open test-app from Repositories Launch Travis CI
  3. Set environment variables on Travis CI - CODECOV_TOKEN: Use for coverage badge
    1. Signin Codecov SignIn Codecov
    2. Accept Codecov access github account Accept Codecov
    3. Select test-app repo Select Repo
    4. Get CODECOV_TOKEN Get Token - EYES_KEY: Use for visual test
    5. Signin Applitools Accept Eyes
    6. Get EYES_KEY Get Eyes Token - GH_REF, GH_TOKEN: Use for deploy github page, GH_REF is github.com/<YOUR_GITHUB_ACCOUNT>/test-app.git
    7. Go to Personal access tokens page Generator Github Token
    8. Create GH_TOKEN can access repo Create Github Token
    9. Get GH_TOKEN Get Github Token - SAUCE_ACCESS_KEY, SAUCE_USERNAME: Use for functional test on Saucelabs
    10. Signin Sauce Labs Accept Sauce Labs
    11. Go to User Settings page Get Sauce Labs
    12. Get SAUCE_ACCESS_KEY & SAUCE_USERNAME - All environment variables Env Variables
  4. Push a commit to master branch, it will trigger Travis CI to build you CI! Build Start Build Passed

Table of Contents

Lint test

CLICK ME
$ npm run lint

Unit test

CLICK ME

Test all unit test

$ npm run test

Test single unit test

$ npm run test::single <path/to/test/file>

Functional test

CLICK ME

๐Ÿ‘‰ [Issue]: No Java runtime present ๐Ÿ‘ˆ Please follow the link install Java.

Test functional test local

๐Ÿ‘‰ Before start the script, make sure website has been launch on https://localhost:3000 or run npm start first

๐Ÿ‘‰ First time run this script, please run npm run install:selenium install selenium dependency first.

$ npm run functional::local

Test functional test on saucelabs with localhost

๐Ÿ‘‰ Before start the script, make sure you have been download sauce connect, and extract sc file to bin/sc

$ npm run start::sauce_connect
# wait for visible `Sauce Connect is up, you may start your tests.`
$ npm run functional::online:localhost

Test all functional test on saucelabs

$ npm run functional::online

Test all functional test on saucelabs with multiple platform

$ npm run functional::online:multiple

Compatibility

Saucelab Compatibility

Big Thanks

Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs

Sauce Logo

test-app's People

Contributors

fossabot avatar sky172839465 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.