|
1 | 1 |
|
2 | 2 | # Automation API Generator |
3 | 3 |
|
4 | | -This project has created to relieve work load as SDET or Automation Test Engineer. In moderation, automation API code able to write with only run the script and generate from Postman collection. You just export the collection, and run the Generator to write the automation code. |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | -## Features |
10 | | - |
11 | | -- Mocha chai generator |
12 | | - |
13 | | - |
14 | | -## Installation |
15 | | - |
16 | | -First export your Postman collection which want to generate |
17 | | - |
18 | | -Clone the project repository to your directory and move json file (Postman collection export) to your directory |
19 | | - |
20 | | -Install package with npm |
21 | | - |
22 | | -```bash |
23 | | - npm install |
24 | | -``` |
25 | | - |
26 | | -Run the generator with |
27 | | -```bash |
28 | | - npm run generate <your-json-file> |
29 | | -``` |
30 | | - |
31 | | -Example: |
32 | | -```bash |
33 | | - npm run generate MyProject.json |
34 | | -``` |
35 | | -And, that's it, you just convert your Postman collection json file to Automation code (Mocha chai) |
36 | | -## Configure your test |
37 | | - |
38 | | -To run tests, you should configure some file |
39 | | - |
40 | | -- If your scenario have some cases, you can using DDT (Data Driven Test), you can configure on test file in data variable |
41 | | -- If you using json schema to validate the response, you just input each json response to json_response folder file |
42 | | -- For run the test, you should configure the runner file |
| 4 | +This project has created to relieve work load as SDET or Automation Test Engineer. In moderation, automation API code able to write with only run the script and generate from Postman collection. You just export the collection and run the Generator to write the automation code. |
| 5 | + |
| 6 | +## Objectives |
| 7 | + |
| 8 | +1. Generate Postman collection with JSON format into Mocha-Chai template scripts |
| 9 | +2. Applying DDT (data-driven test) mechanism to request API with a lot of datas in body request |
| 10 | +3. Applying POM (page-object model) mechanism to request the API so it can be reused to another test file |
| 11 | +4. Have default verification for status code and json-schema |
| 12 | +5. Create scripts that easy to maintain |
| 13 | + |
| 14 | +## List of Contents: |
| 15 | +- [Prerequisite](docs/prerequisite.md) |
| 16 | +- [Installation](docs/installation.md) |
| 17 | +- [Lifecycle of Mocha Framework](docs/lifecycle.md) |
| 18 | +- [Folder Structure and Usage](docs/folder.md) |
| 19 | + - [/runner](docs/folder.md#runner) |
| 20 | + - [/tests/data](docs/folder.md#testsdata) |
| 21 | + - [/tests/helper](docs/folder.md#testshelper) |
| 22 | + - [/tests/pages](docs/folder.md#testspages) |
| 23 | + - [/tests/scenarios](docs/folder.md#scenarios.md) |
| 24 | + - [/tests/schema](docs/folder.md#testsschema) |
| 25 | +- [Scenarios](docs/scenarios.md) |
| 26 | + - [Default templates](docs/scenarios.md#default-templates) |
| 27 | + - [Default templates with body request](docs/scenarios.md#default-templates-with-body-request) |
| 28 | +- [Pages](docs/pages.md) |
| 29 | + - [Default templates](docs/pages.md#default-templates) |
| 30 | +- [Implementation](docs/implementation.md) |
| 31 | +- [Best Practices](docs/practice.md) |
| 32 | +- [Common Error](docs/error.md) |
0 commit comments