You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,7 +176,7 @@ Specification files and AutoRest configuration files in one RP folder are better
176
176
## Next steps
177
177
The next step in the process after a spec is completed is to generate SDKs and API reference documentation. If you're Microsoft employee, go to the [Azure SDK - Internal Wiki](https://aka.ms/jointhesdk) for more information.
178
178
179
-
External Contributors can read [Getting Started with Azure API Specifications](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/getting-started-with-azure-api-specifications.md).
179
+
External Contributors can read [Getting Started with OpenAPI Specifications](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/Getting%20started%20with%20OpenAPI%20specifications.md).
180
180
181
181
---
182
182
_This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments._
Copy file name to clipboardExpand all lines: documentation/api-scenario/how-to/QuickStart.md
+74-34Lines changed: 74 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,24 +5,27 @@
5
5
https://opensource.org/licenses/MIT
6
6
-->
7
7
8
-
# API test quick start
8
+
# Quick start with API Scenario test
9
9
10
10
## Install
11
11
12
-
`oav` is an open-source powerful tool for swagger validation, example generation, and API testing. GitHub: https://github.com/Azure/oav.
12
+
`oav` is an open-source powerful tool for swagger validation, API Scenario testing, and examples generation. GitHub: https://github.com/Azure/oav.
13
13
14
14
```sh
15
-
npm install -g oav@latest
15
+
npm install -g oav
16
16
```
17
17
18
18
### OAV Features
19
19
20
-
- Very easy to use and run.
21
-
- Support postman collection format. Debug easily.
22
-
- Request response validation. `oav` implement a powerful validation algorithm and help developer to detect service issue in the early phase.
23
-
- Validation result report. After each run API scenario, developer will get a validation report which contains detect issue in api test.
20
+
- Very easy to use and run. It supports running API Scenario with ARM Dogfood/Canary/Production environments, and local environment as well.
21
+
- Support Postman collection format. Debug easily.
22
+
- Traffic schema validation and Azure API guidelines validation. `oav` implements a powerful validation algorithm and help developer to detect service issue in the early phase.
23
+
- Generating high quality Swagger examples from API test traffic.
24
+
- Validation result report. After each run API scenario, developer will get a validation report which contains detected issue in API test.
24
25
- Integrate everywhere. Easily integrate with azure-pipeline, cloud-test.
25
26
27
+
See `oav run -h` to find all available options.
28
+
26
29
## Create AAD app
27
30
28
31
To run API test, first please prepare an AAD app which is used for provisioning Azure resource. Please grant subscription contributor permission to this AAD app.
@@ -31,7 +34,7 @@ For how to create AAD app, please follow this doc https://docs.microsoft.com/en-
31
34
32
35
## Authoring steps
33
36
34
-
We will write API scenario file for SignalR service as an example.
37
+
We will write API scenario file for AppConfiguration service as an example.
35
38
36
39
#### 1. Write your first API scenario file
37
40
@@ -44,68 +47,105 @@ Now write your basic API scenario. For more detail about API scenario file forma
The `env.json` file contains required API scenario variables such as, subscriptionId, AAD applicationId, AAD applicationSecret.
62
104
63
105
```json
64
106
{
65
107
"subscriptionId": "<my subscription id>",
66
-
"location": "westus",
108
+
"location": "westcentralus",
67
109
"tenantId": "<AAD app tenantId>",
68
110
"client_id": "<my add client_id>",
69
111
"client_secret": "<my aad client_secret>"
70
112
}
71
113
```
72
114
73
-
#### 3. Run api test
115
+
#### 3. Run API Scenario test
74
116
75
117
```sh
76
-
oav run /home/user/azure-rest-api-specs/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2020-07-01-preview/scenarios/signalR.yaml -e env.json
118
+
oav run ~/workspace/azure-rest-api-specs/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/quickstart.yaml --tag=package-2022-05-01 -e env.json --verbose
77
119
```
78
120
79
-
#### 4. Debug with postman
121
+
#### 4. Debug with Postman
80
122
81
-
Sometimes the command `oav run` may fail due to non 2xx HTTP status code. Now you need to debug the API scenario with postman.
123
+
Sometimes the command `oav run` may fail due to non 2xx HTTP status code. Now you need to debug the API scenario with Postman.
82
124
83
-
When run `run`, it automatically generate postman collection and postman env in `generated/<providerNamespace>/<apiScenarioFile>/<runId>/<apiScenario>` folder. Here is the generated file folder structure. The `collection.json` and `env.json` is generated postman collection file and environment file. `202105120922-5c3x5` is current runId. For each run command it will generated unique runId.
125
+
When run `run`, it automatically generate Postman collection and postman env in `.apitest/<apiScenarioFile>/<runId>/<scenario>` folder. Here is the output folder structure. The `collection.json` and `env.json` is generated postman collection file and environment file. `202207221820-cyq4mk` is the runId, generated uniquely for each run command.
84
126
85
127
```
86
-
generated
87
-
└── Microsoft.SignalRService
88
-
└── 2020-07-01-preview
89
-
└── signalR
90
-
└── 202105120922-5c3x5
91
-
├── signalR_0
92
-
│ ├── collection.json
93
-
│ └── env.json
94
-
| |__ report.json
95
-
└── signalR_0.json
128
+
.apitest
129
+
└── quickstart.yaml
130
+
└── 202207221820-cyq4mk
131
+
├── quickStart
132
+
│ ├── collection.json
133
+
│ ├── env.json
134
+
│ └── report.json
135
+
└── quickStart.json
96
136
```
97
137
98
138
Postman is a widely used GUI API testing tool. And you could use Postman import the generated postman collection and env for your local debug.
After debug with postman, you need to rewrite back all the updated values and run `oav run <api-scenario-file> -e <env.json>` again. The result should be successful.
148
+
After debug with Postman, you need to rewrite back all the updated values and run `oav run <api-scenario-file> -e <env.json>` again. The result should be successful.
0 commit comments