/e2e-ui-testing

A simple restaurant app to explain end to end testing using jest and puppeteer

Primary LanguageJavaScript

A simple restaurant app to explain end to end testing using jest and puppeteer CircleCI

I used react gatsby (just want to give it a try no specific reasons) to develop this application but the jest and puppeteer combo can be used to test any application that runs on the browser

Video example

Click to watch the execution of the test cases

https://drive.google.com/file/d/1dN5VRUiCY6BRG0dzE7R56X-si1Ox0BSC/preview

Usage

You need to have node > 9

Install the dependencies

npm i

Run the App

npm start

Run the test cases

npm test

Options to run the test cases

  • Headless mode (Default) This runs the test cases in the background parallelly. This is the default behaviour.
export HEADLESS=true
npm test
  • Non-Headless mode This runs the test cases in the foreground. The runInBand flag, runs the test in series. So that you can view the execution of one test case at a time. This is optional though.
export HEADLESS=false
npm test -- --runInBand