Skip to content

Commit e048e27

Browse files
Initial PoC for automated Postman E2E testing
1 parent 4393940 commit e048e27

17 files changed

+1787
-0
lines changed

PoC-test.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Postman PoC test
2+
## Prerequisite
3+
- start db and es:
4+
```bash
5+
$ cd resources-api/local
6+
$ docker-compose up
7+
```
8+
- create tables:
9+
```bash
10+
$ cd resources-api
11+
12+
# NOTE:
13+
# if tables and data already exist, please run first
14+
15+
# $ npm run drop-tables:test
16+
17+
# to drop data and tables
18+
19+
$ npm run create-tables:test
20+
```
21+
- start mock challenge api:
22+
```
23+
$ cd resources-api/mock
24+
$ npm run mock-challenge-api
25+
```
26+
- start app
27+
```bash
28+
$ cd resources-api
29+
$ source env.sh # set env variables
30+
$ NODE_ENV=test npm start
31+
```
32+
33+
## Postman test
34+
Please refer to: https://drive.google.com/file/d/1VcTtNwI5_TXgnEKT4TruqG0Z-ts0J83G/view?usp=sharing
35+
36+
## Postman mock server
37+
E2E tests use nock to mock `BUSAPI_URL`, where postman mock server could be used to replace nock.
38+
Please refer to: https://drive.google.com/file/d/1GXMzyqpzwix-LDBwieiRFfpJlJxrTIgI/view?usp=sharing

ReadMe.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,7 @@ npm run e2e
184184
## Verification
185185

186186
Refer to the verification document `Verification.md`
187+
188+
## Postman PoC test
189+
190+
Refer to the PoC test document [**PoC-test.md**](PoC-test.md)

env.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
export AUTH0_CLIENT_ID=jGIf2pd3f44B1jqvOai30BIKTZanYBfU
4+
5+
export AUTH0_CLIENT_SECRET=ldzqVaVEbqhwjM5KtZ79sG8djZpAVK8Z7qieVcC3vRjI4NirgcinKSBpPwk6mYYP
6+
7+
export AUTH0_AUDIENCE=https://m2m.topcoder-dev.com/

0 commit comments

Comments
 (0)