https://github.com/abhinaba-ghosh/testcafe-typescript-starter
:coffee: Testcafe typescript boilerplate with allure report
https://github.com/abhinaba-ghosh/testcafe-typescript-starter
allure-reporting e2e testcafe testcafe-reporter testcafe-typescript-boilerplate typescript
Last synced: 10 months ago
JSON representation
:coffee: Testcafe typescript boilerplate with allure report
- Host: GitHub
- URL: https://github.com/abhinaba-ghosh/testcafe-typescript-starter
- Owner: abhinaba-ghosh
- License: mit
- Created: 2020-05-28T21:29:50.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-01T03:16:00.000Z (almost 6 years ago)
- Last Synced: 2024-10-18T08:34:52.474Z (over 1 year ago)
- Topics: allure-reporting, e2e, testcafe, testcafe-reporter, testcafe-typescript-boilerplate, typescript
- Language: TypeScript
- Homepage:
- Size: 68.1 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Testcafe-Typescript-Starter
Testcafe typescript boilerplate with neat folder structure and allure report.
#### Key highlights
- Typescript support
- Neat folder structure
- Page object model for code maintenance
- ESLint support for code quality
- Prettier for code formatting
- Allure reporting
- Husky for pre-commit hook
#### Install dependencies
```ssh
npm install
```
#### Lint your code
```ssh
npm run lint
```
#### Run tests
```ssh
npm run e2e
```
#### Generate report
```ssh
npm run report
// publish report
npm run report:publish
```
Reports will be generated inside `reports` folder.
#### Debug tests
If you are using vscode, debug configuration is provided `.vscode/launch.json` file. Enable your breakpoints and hit `f5` to trigger the debug execution.
#### Test Folder Structure
```
testcafe
|____specs
| |____login.spec.ts
| |____home.spec.ts
|____utils
| |____password.handler.ts
| |____selector.helper.ts
| |____index.ts
| |____logger.helper.ts
| |____database.helper.ts
| |____waiter.helper.ts
|____pages
| |____login.page.ts
| |____home.page.ts
| |____index.ts
```
The page object model resides under `testcafe` folder.
- `pages` folder contains the page elements abd associated business logics
- `specs` folder contains testcafe fixures
- `utils` folder contains different testcafe helpers
##
Docker housekeeping, add --rm (docker run --rm -v ...) to remove docker container after tests end. takes up less disk space.
Runs docker image prune and docker containers prune regularly to delete old images & container to reclaim back precious disk space
#### Allure report
Reports will be generated for each test cases and allure will integrate those results and combine.
