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
CLICK ME
Forkthis repo & make sure you have been install nodejs.clonerepo from your account
$ git clone https://github.com/<YOUR_GITHUB_ACCOUNT>/test-app.git- Then run these script to setup website. 👇
# move to test-app dir
$ cd test-app
# install dependency
$ npm install
# launch website
$ npm start- Sign in Travis CI with github account
- Open
test-appfromRepositories
- Set environment variables on Travis CI
- CODECOV_TOKEN: Use for coverage badge
- Signin Codecov

- Accept Codecov access github account

- Select test-app repo

- Get
CODECOV_TOKEN
- EYES_KEY: Use for visual test - Signin Applitools

- Get
EYES_KEY
- GH_REF, GH_TOKEN: Use for deploy github page, GH_REFisgithub.com/<YOUR_GITHUB_ACCOUNT>/test-app.git - Go to Personal access tokens page

- Create
GH_TOKENcan access repo
- Get
GH_TOKEN
- SAUCE_ACCESS_KEY, SAUCE_USERNAME: Use for functional test on Saucelabs - Signin Sauce Labs

- Go to User Settings page

- Get
SAUCE_ACCESS_KEY&SAUCE_USERNAME- All environment variables
- Signin Codecov
Pusha commit to master branch, it will trigger Travis CI to build you CI!

CLICK ME
$ npm run lintCLICK ME
Test all unit test
$ npm run testTest single unit test
$ npm run test::single <path/to/test/file>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::localTest 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:localhostTest all functional test on saucelabs
$ npm run functional::onlineTest all functional test on saucelabs with multiple platform
$ npm run functional::online:multipleCross-browser Testing Platform and Open Source <3 Provided by Sauce Labs
