Skip to content

Commit db7497f

Browse files
committed
DOCS: Brief description and instructions
1 parent 02c5ed0 commit db7497f

3 files changed

Lines changed: 67 additions & 5 deletions

File tree

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
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```

package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@
3232
"dependencies": {
3333
"axios": "^0.21.4",
3434
"codeceptjs": "^3.1.2",
35+
"lodash": "^4.17.17",
3536
"ts-node": "^10.2.1",
36-
"typescript": "^4.4.3",
37-
"lodash": "^4.17.17"
37+
"typescript": "^4.4.3"
3838
},
3939
"devDependencies": {
4040
"@types/jest": "^27.0.2",
41+
"@types/lodash": "^4.14.176",
4142
"@typescript-eslint/eslint-plugin": "^4.31.2",
4243
"@typescript-eslint/parser": "^4.31.2",
43-
"@types/lodash": "^4.14.176",
44+
"allure-commandline": "^2.17.2",
4445
"eslint": "^7.32.0",
4546
"eslint-config-airbnb-base": "^14.2.1",
4647
"eslint-config-airbnb-typescript": "^14.0.0",
@@ -51,9 +52,9 @@
5152
"expect": "^27.2.4",
5253
"husky": "^7.0.2",
5354
"jest": "^27.0.2",
55+
"pre-commit": "^1.2.2",
5456
"prettier": "^2.4.1",
5557
"prettier-eslint": "^13.0.0",
56-
"pre-commit": "^1.2.2",
5758
"ts-jest": "^27.0.2"
5859
},
5960
"husky": {

0 commit comments

Comments
 (0)