Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dipjyotimetia/cypresstestframework
CypressTest Framework
https://github.com/dipjyotimetia/cypresstestframework
cypress cypress-io cypress-tests test-automation testing
Last synced: 2 months ago
JSON representation
CypressTest Framework
- Host: GitHub
- URL: https://github.com/dipjyotimetia/cypresstestframework
- Owner: dipjyotimetia
- License: mit
- Created: 2019-01-07T11:23:38.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-12T07:36:56.000Z (9 months ago)
- Last Synced: 2024-04-13T20:37:23.865Z (8 months ago)
- Topics: cypress, cypress-io, cypress-tests, test-automation, testing
- Language: TypeScript
- Homepage: https://dipjyotimetia.github.io/CypressTestFramework/
- Size: 9.07 MB
- Stars: 10
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![Build Status](https://github.com/dipjyotimetia/CypressTest/workflows/CypressCI/badge.svg)](https://github.com/dipjyotimetia/CypressTest/actions)
[![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/d463521f/CypressTestFramework)## Cypress Test Framework
![image](./doc/CypressTestFramework.png)
### Sorry Cypress Dashboard
![image](./doc/SorryCypressDashboard.png)
![image](./doc/SorryCyResult.png)### Cypress Test Result
![image](./doc/CyResult.png)#### Installation:
- Install _nodejs 18.16.0 lts_ [Link](https://nodejs.org/en/download/)
- Install Vscode [link](https://code.visualstudio.com/download)#### Project Setup:
- git clone repo
- npm install#### Write Code:
- Add `/// ` and `/// ` if required `/// ` reference on the top, to get typed reference.
- Add new spec file with the format TC00*\_SampleTest*\_spec.js
- Write functions in PageObjects as E.g login
- Write helper methods in _support/actions.js_
- Add test data in _data/testdata.js_
- Add mock data files in _fixtures/_#### Configure/update/set Test Environments:
- Open config and update test environment urls,user,pass and update it to config.js
- Test environment json files names are case sensitive
- To run test on specific environment update `configFile=uat or configFile=prod`#### Setup SorryCypress Dashboard:
- `docker-compose up -d`#### Test:
- `test:cypress` run tests in sorry cypress dashboard
- `npm run cy:chrome` run tests in chrome browser
- `npm run cypress:open` for test development and run(_Test Watcher is set to false_)
- `npm run cy:test` run all tests in headless
- `npx cypress run --env configFile=test --headed --spec 'cypress/integration/TC002_Login_Spec.js'` To run specific test in chrome#### Generate Report Locally:
- `npm run combine-reports` to combine mocha json report
- `npm run generate-report` to generate html report