Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codewithmmak/mocha-chai-typescript
This is sample Test Automation framework designed using Mocha, Chai and TypeScript
https://github.com/codewithmmak/mocha-chai-typescript
bdd-framework chai chai-typescript mocha mochawesome typescript typescript-test visual-studio
Last synced: about 1 month ago
JSON representation
This is sample Test Automation framework designed using Mocha, Chai and TypeScript
- Host: GitHub
- URL: https://github.com/codewithmmak/mocha-chai-typescript
- Owner: codewithmmak
- License: mit
- Created: 2018-11-22T17:37:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-19T20:00:17.000Z (about 1 month ago)
- Last Synced: 2024-11-19T21:17:53.805Z (about 1 month ago)
- Topics: bdd-framework, chai, chai-typescript, mocha, mochawesome, typescript, typescript-test, visual-studio
- Language: TypeScript
- Homepage:
- Size: 478 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
![Mocha, Chai, and Typescript](./images/mocha-chai-typescript.png?raw=true "Mocha, Chai, and Typescript")
# Mocha, Chai, and Typescript Setup Guide
This is Test Automation framework designed using Mocha, Chai, and Typescript.## Framework Structure
```
├───images
├───page-objects
├───test-data
├───test-suites
├───.gitignore
├───package.json
├───README.md
└───tslint.json
```## To Get Started
### Pre-requisites
* Download and install Chrome or Firefox browser.
* Download and install Node.js
* Download and install any Text Editor like Visual Code/Sublime/Brackets### Setup Scripts
* Clone the repository into a folder
* Go to Project root directory and install Dependency: `npm install`
* All the dependencies from package.json and ambient typings would be installed in node_modules folder.### How to write Test
* Add new spec under test-suite folder
* Name the file as .spec.ts (e.g. super-calculator.spec.ts)
* Create folder under page-objects/pages as (e.g. super-calculator)
* Under page folder create constant, helper and page object file.
* .constants.ts (e.g. super-calculator.constants.ts)
* .helper.ts (e.g. super-calculator.helper.ts)
* .po.ts (e.g. super-calculator.po.ts)### How to Run Test
* Run complete Test Suite: `npm test`### How to Update local npm packages
* Go to Project root directory and run command: `npm update`### Sample Test Results
![Mocha, Chai, and Typescript Test Result](./images/test-results.png?raw=true "Mocha, Chai, and Typescript Test Result")