|
1 | | -# rest-ts-test-axios-codeceptjs-allure-example |
| 1 | +# API testing framework rest-ts-test-axios-codeceptjs-allure-solution-example |
| 2 | + |
| 3 | + |
| 4 | +``` |
| 5 | + ---------------------------------------------------------- |
| 6 | +| Architecture | |
| 7 | +|-------------------|------------|-------------|-----------| |
| 8 | +| REST API Testing | Execution | Assertion | Reporting | |
| 9 | +|-------------------|------------|-------------|-----------| |
| 10 | +| | | | | |
| 11 | +| Axios | Codeceptjs | Jest Expect | Allure | |
| 12 | +| | | | | |
| 13 | + ---------------------------------------------------------- |
| 14 | +
|
| 15 | + -------------------------------------------------------------------------- |
| 16 | +| Code Control | |
| 17 | +|-----------------------------------------------|-------------|------------| |
| 18 | +| Linter | Code formatting / Code style control | Commit hook | Unit tests | |
| 19 | +|--------|--------------------------------------|-------------|------------| |
| 20 | +| Eslint | Prettier & Eslint | Husky | Jest | |
| 21 | + -------------------------------------------------------------------------- |
| 22 | +
|
| 23 | +``` |
| 24 | + |
| 25 | +## Required presets |
| 26 | +* Docker |
| 27 | +* Node.js |
| 28 | +* JDK or JRE 8+ (For Allure reports only) |
| 29 | + |
| 30 | +## How to run |
| 31 | + |
| 32 | +**to start mocked backend server** |
| 33 | +```npm run docker:mock-server:start``` |
| 34 | + |
| 35 | +The Mocked Backend Server will start on the port `38391` |
| 36 | +Open http://localhost:38391 to check if it works. Should see message: "The Mock Backend server is working properly" |
| 37 | + |
| 38 | + |
| 39 | +**to run tests locally** |
| 40 | +```npm run test-local``` |
| 41 | + |
| 42 | +**to open Allure report after test run** |
| 43 | +```npm allure:open``` |
| 44 | + |
| 45 | +**to run tests in Docker container** |
| 46 | +```npm run test-in-docker``` |
0 commit comments