Skip to content

proustibat/xke-introduction-testcafe

Repository files navigation

xke-introduction-testcafe

CircleCI Tested with TestCafe

This is the source code illustrating the "Introduction to TestCafe" presentation for the Xebians at the march's XKE day at Xebia France. Slides are available here. Each commit represents a step to learn how to use TestCafe.

Install

yarn install

Develop

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

Unit tests

yarn test

Launches the test runner in the interactive watch mode.

Build

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

E2E tests

End-to-end use TestCafe.

You can run it in different way, browsers, headless mode or not, etc (read the doc):

testcafe chrome:headless e2e/*.js --app 'yarn serve:build'
testcafe remote e2e/*.js --app 'yarn serve:build' 
testcafe remote e2e/*.js --app 'yarn serve:build' --qr-code
...

CircleCI

On each push, build and tests are running. See the dashboard here.

Deploy

yarn deploy

It deploys the app with Surge on xke-introduction-testcafe.surge.sh. Note that you need to be logged. You can deploy it on another domain by changing /public/CNAME content.

Prettier

Note that prettier runs before each commit and fixes eventual warnings and errors.


What else

This project was bootstrapped with Create React App.

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.