https://github.com/qualityshepherd/testcafe-example
An example Testcafe project, chock full of e2e testy goodness
https://github.com/qualityshepherd/testcafe-example
delicious-eggs e2e-testing es6 examples javascript nodejs pageobject-pattern parallel test-automation testcafe
Last synced: 2 days ago
JSON representation
An example Testcafe project, chock full of e2e testy goodness
- Host: GitHub
- URL: https://github.com/qualityshepherd/testcafe-example
- Owner: qualityshepherd
- License: mit
- Created: 2018-05-30T22:09:58.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2023-06-30T12:26:52.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T13:51:24.544Z (26 days ago)
- Topics: delicious-eggs, e2e-testing, es6, examples, javascript, nodejs, pageobject-pattern, parallel, test-automation, testcafe
- Language: JavaScript
- Homepage:
- Size: 822 KB
- Stars: 14
- Watchers: 1
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/qualityshepherd/testcafe-example/actions/workflows/e2e.yaml)
## Testcafe Example
Example e2e tests (some of which are slightly silly) written in [Testcafe](https://github.com/DevExpress/testcafe), that:
- use a page object pattern (now with 100% _less class_)
- are es6y
- use async/await
- run in parallel
- run on multiple browsers
- run headlessly
- run tests on [BrowserStack](https://browserstack.com)## Setup
1. clone `clone [email protected]:qualityshepherd/testcafe-example.git`
2. install `npm i`## Run
* run `npm test` to watch in browser, or
* `npm run ci` to run parallel, headless, and retry fails on Chrome
* `npm run browserstack` to run tests in the cloud (requires an account and env keys to be set)
* `npm run` to see more run options## Feedback
Testcafe is really good; I used it for years but it has two issues that ultimately became deal-breakers for me:
1. no `beforeAll` which sucks on it's own but also means you have to use `Roles`... which _really_ sucks.
2. they shard/thread tests at the _test level_ instead of the _file level_.---
