https://github.com/dipjyotimetia/cypresstestframework
CypressTest Framework
https://github.com/dipjyotimetia/cypresstestframework
cypress cypress-io cypress-tests test-automation testing
Last synced: 8 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-30T04:49:20.000Z (over 1 year ago)
- Last Synced: 2024-10-30T07:28:04.810Z (over 1 year ago)
- Topics: cypress, cypress-io, cypress-tests, test-automation, testing
- Language: TypeScript
- Homepage: https://dipjyotimetia.github.io/CypressTestFramework/
- Size: 6.36 MB
- Stars: 10
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://github.com/dipjyotimetia/CypressTest/actions)
[](https://percy.io/d463521f/CypressTestFramework)
## Cypress Test Framework

### Sorry Cypress Dashboard


### Cypress Test Result

#### 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