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
Copy file name to clipboardExpand all lines: content/documentation/references/test-endpoints.md
+39-39Lines changed: 39 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,56 +9,56 @@ weight: 4
9
9
10
10
## Introduction
11
11
12
-
From the page displaying basic information on your [API or Service mocks](/documentation/tutorials/getting-started), you have the ability to launch new tests against different endpoints that may be representing different environment into your development process. Hitting the **NEW TEST...** button, leads you to the following form where you will be able to specify a target URL for the test, as well as a Runner—a testing strategy for your new launch:
12
+
From the page displaying basic information on your [API or Service mocks](/documentation/tutorials/getting-started), you have the ability to launch new tests against different endpoints that may represent different environments in your development process. Hitting the **NEW TEST...** button leads you to the following form, where you will be able to specify a target URL for the test, as well as a Runner—a testing strategy for your new launch:
This reference documentation walks you through the different parameters available when launching a new test on Microcks. All the parameters mentioned below are available whether you're launching a Test via the Web UI, via the [API](/documentation/guides/automation/api), via the [CLI](/documentation/guides/automation/api) or any other libraries.
16
+
This reference documentation walks you through the available parameters when launching a new test in Microcks. All the parameters mentioned below are available whether you're launching a Test via the Web UI, via the [API](/documentation/guides/automation/api), via the [CLI](/documentation/guides/automation/api) or any other libraries.
17
17
18
18
### Service under test
19
19
20
-
**Service under test** is simply the reference of the API/Service specification we use as a reference for this test. This a couple of `Service Name` and `Service Version`. Depending on the **Runner** you choose, Microcks while reuse the information of an [Artifact](/documentation/overview/main-concepts/#artifacts) attached to this Service name and version.
20
+
**Service under test** is simply the API/Service specification we use for this test. This is a couple of `Service Name` and `Service Version`. Depending on the **Runner** you choose, Microcks while reuse the information of an [Artifact](/documentation/overview/main-concepts/#artifacts) attached to this Service name and version.
21
21
22
22
### Test Endpoint
23
23
24
-
The **Test Endpoint** is simply a URI where a deployed component is providing an endpoint implementing your API specification. In the testing literature, this is usually defined as the URI of the [System Under Test](https://en.wikipedia.org/wiki/System_under_test).
24
+
The **Test Endpoint** is simply a URI where a deployed component provides an endpoint that implements your API specification. In the testing literature, this is usually defined as the [System Under Test](https://en.wikipedia.org/wiki/System_under_test) URI.
25
25
26
-
Depending on your API/Service type and the protocol binding you want to connect with (especially for event-based APIs), Test Endpoints mays have different specific syntax. Please jump to the [Endpoints syntax section](#endpoints-syntax) on this page to learn more.
26
+
Depending on your API/Service type and the protocol binding you want to connect to (especially for event-based APIs), Test Endpoints may use different syntax. Please jump to the [Endpoints syntax section](#endpoints-syntax) on this page to learn more.
27
27
28
28
### Test Runner
29
29
30
-
Microcks offers different strategies for running tests on endpoints where our microservice being developed are deployed. We recommend having a read at our explanations on [Conformance Testing](/documentation/explanations/conformance-testing/#conformance-metrics). Such strategies are implemented as **Test Runners**. Here are the default Test Runners available within Microcks:
30
+
Microcks offers different strategies for running tests on endpoints where our microservice is being developed and deployed. We recommend reading our explanations on [Conformance Testing](/documentation/explanations/conformance-testing/#conformance-metrics). Such strategies are implemented as **Test Runners**. Here are the default Test Runners available within Microcks:
|`HTTP`| REST and SOAP | Simplest test runner that only checks that valid target endpoints are deployed and available - it means return a `20x` or `404`Http status code when appropriated. This can be called a simple "smock test". |
35
-
|`SOAP`| SOAP | Extension of HTTP Runner that also checks that the response is syntactically valid regarding SOAP WebService contract. It realizes a validation of the response payload using XSD schemas associated to service. |
36
-
|`SOAP_UI`| REST and SOAP | When the API artifact is defined using [SoapUI](/documentation/references/artifacts/soapui-conventions): ensures that assertions put into SoapUI Test cases are checked valid. Report failures otherwise. |
34
+
|`HTTP`| REST and SOAP | Simplest test runner that only checks that valid target endpoints are deployed and available - it means return a `20x` or `404`HTTP status code when appropriate. This can be called a simple "smock test". |
35
+
|`SOAP`| SOAP | Extension of HTTP Runner that also checks that the response is syntactically valid regarding the SOAP WebService contract. It validates the response payload against the service's XSD schemas. |
36
+
|`SOAP_UI`| REST and SOAP | When the API artifact is defined using [SoapUI](/documentation/references/artifacts/soapui-conventions): ensures that assertions put into SoapUI Test cases are checked as valid. Report failures otherwise. |
37
37
|`POSTMAN`| REST, SOAP and GRAPHQL | When the API artifact is defined using [Postman](/documentation/references/artifacts/postman-conventions): executes test scripts as specified within a Postman Collection. Report failures otherwise. |
38
-
|`OPEN_API_SCHEMA`|REST | When the API artifact is defined using [Open API](/documentation/references/artifacts/openapi-conventions): it executes example requests and check that results have the expected Http status and that payload is compliant with OpenAPI schema specified into OpenAPI specification. Report failures otherwise. |
39
-
|`ASYNC_API_SCHEMA`| EVENT | When the API artifact is defined using [Async API](/documentation/references/artifacts/asyncapi-conventions): it connects to specified broker endpoints, consume messages and check that payload is compliant with AsyncAPI schema specified into AsyncAPI specification. Report failures otherwise.|
40
-
|`GRPC_PROTOBUF`|GRPC | When the API artifact is defined using [gRPC/Protobuf](/documentation/references/artifacts/grpc-conventions): it executes example requests and check that results payload is compliant with Protocol Buffer schema specified into gRPC protobuffer file. Report failures otherwise. |
41
-
|`GRAPHQL_SCHEMA`|GRAPHQL | When the API is of type [GraphQL](/documentation/references/artifacts/graphql-conventions): it executes example requests and check that results payload is compliant with the GraphQL Schema of the API. Report failures otherwise. |
38
+
|`OPEN_API_SCHEMA`| REST | When the API artifact is defined using [Open API](/documentation/references/artifacts/openapi-conventions): it executes example requests and checks that results have the expected HTTP status and that the payload is compliant with the OpenAPI schema specified in the OpenAPI specification. Report failures otherwise. |
39
+
|`ASYNC_API_SCHEMA`| EVENT | When the API artifact is defined using [Async API](/documentation/references/artifacts/asyncapi-conventions): it connects to specified broker endpoints, consumes messages and checks that the payload is compliant with the AsyncAPI schema specified in the AsyncAPI specification. Report failures otherwise.|
40
+
|`GRPC_PROTOBUF`| GRPC | When the API artifact is defined using [gRPC/Protobuf](/documentation/references/artifacts/grpc-conventions): it executes example requests and checks that the results payload is compliant with the Protocol Buffer schema specified in the gRPC protobuf file. Report failures otherwise. |
41
+
|`GRAPHQL_SCHEMA`| GRAPHQL | When the API is of type [GraphQL](/documentation/references/artifacts/graphql-conventions): it executes example requests and checks that the results payload is compliant with the GraphQL Schema of the API. Report failures otherwise. |
42
42
43
43
### Operations
44
44
45
-
Depending on the Test your are running, you may want to filter the list of operations that will be actually tested. By default, all operations are included in the test but you can pick and choose the one you want.
45
+
Depending on the Test you are running, you may want to filter the list of operations that will actually be tested. By default, all operations are included in the test, but you can pick and choose the ones you want.
46
46
47
-
> 💡 When running a Test on an Event-baed API using the `ASYNC_API_SCHEMA` strategy, you will have to choose **one and only one** operation at a time. This is because Async endpoints may be different for each and every operation so a Microcks tests can just include one Async operation.
47
+
> 💡 When running a Test on an Event-based API using the `ASYNC_API_SCHEMA` strategy, you will have to choose **one and only one** operation at a time. This is because Async endpoints may differ for each operation, so a Microcks test can include only one Async operation.
48
48
49
49
### Timeout
50
50
51
-
Depending on the type of Service or Tests you are running, the specification of a **Timeout**maybe mandatory. This is a numerical value expressed in milliseconds.
51
+
Depending on the type of Service or Test you are running, the **Timeout**specification may be mandatory. This is a numerical value expressed in milliseconds.
52
52
53
53
### Secret
54
54
55
-
Depending on the Test Endpoint you are connecting to, you may need additional authentication information - like credentials or custom X509 Certificates. You may reuse an [Authentication Secret](/documentation/guides/administration/secrets) that has been made available in the Microcks installation by your administrator.
55
+
Depending on the Test Endpoint you are connecting to, you may need additional authentication information, such as credentials or custom X509 Certificates. You may reuse an [Authentication Secret](/documentation/guides/administration/secrets) that your administrator has made available in the Microcks installation.
56
56
57
57
### OAuth2
58
58
59
-
If the secured Test Endpoint cannot be accessed using a static [Authentication Secret](/documentation/guides/administration/secrets), Microcks is able to handle an OAuth2 / OpenID Connect authentication flow as the Tests prerequisites in order to retrieve an ephemeral bearer token.
59
+
If the secured Test Endpoint cannot be accessed using a static [Authentication Secret](/documentation/guides/administration/secrets), Microcks can handle an OAuth2/OpenID Connect authentication flow as part of the Test's prerequisites to retrieve an ephemeral bearer token.
60
60
61
-
The supported Oauth2 grant types are `Client credentials`, `Refresh token` and `Password`. For each of this authentication flow, you will have to provide additional information like:
61
+
The supported Oauth2 grant types are `Client credentials`, `Refresh token` and `Password`. For each of these authentication flows, you will have to provide additional information like:
62
62
* The **OAuth2 Token URI**: a URL that will be used for token retrieval,
63
63
* The **Client Id**: the OAuth2 client identifier,
64
64
* The **Client Secret**: the OAuth2 secret,
@@ -70,95 +70,95 @@ Additionally, you will have to provide a **Refresh Token** when using the `Refre
70
70
71
71
### Headers Override
72
72
73
-
This optional parameter allows you to add/override requests headers with global or operationspecific ones. You have to use a comma-separated string for multiple values corresponding to the same header.
73
+
This optional parameter allows you to add/override request headers with global or operation-specific ones. You have to use a comma-separated string for multiple values corresponding to the same header.
74
74
75
75
## Endpoints syntax
76
76
77
-
### HTTPbased APIs
77
+
### HTTP-based APIs
78
78
79
-
For HTTPbased APIs (REST, SOAP, GraphQL or gRPC), this is a simple URL that should respect following pattern:
79
+
For HTTP-based APIs (REST, SOAP, GraphQL or gRPC), this is a simple URL that should respect the following pattern:
The `/{service.path}` may be optioanl if your target API is deployed on the root context.
85
+
The `/{service.path}` may be optional if your target API is deployed on the root context.
86
86
87
-
### Eventbased APIs
87
+
### Event-based APIs
88
88
89
-
For Eventbased API through [Async API](/documentation/references/apis/async-api) testing, pattern is depending on the protocole binding you'd like to test.
89
+
For Event-based API testing via the [Async API](/documentation/references/apis/async-api), the pattern depends on the protocol binding you'd like to test.
90
90
91
91
#### Kafka
92
92
93
-
Kafka Test Endpoint have the following form with optional parameters placed just after a `?` and separated using `&` character:
93
+
Kafka Test Endpoint has the following form with optional parameters placed just after a `?` and separated using the`&` character:
|`registryUrl`| The URL of schema registry that is associated to the tested topic. This parameter is required when using and testing [Avro](https://avro.apache.org) encoded messages. |
101
+
|`registryUrl`| The URL of the schema registry that is associated with the tested topic. This parameter is required when using and testing [Avro](https://avro.apache.org) encoded messages. |
102
102
|`registryUsername`| The username used if access to the registry is secured. |
103
-
|`registryAuthCredSource`| The source for authentication credentials if any. Valid values are just `USER_INFO`. |
103
+
|`registryAuthCredSource`| The source for authentication credentials, if any. Valid values are just `USER_INFO`. |
104
104
105
105
As an example, you may have this kind of Test Endpoint value: `kafka://mybroker.example.com:443/test-topic?registryUrl=https://schema-registry.example.com®istryUsername=fred:letmein®istryAuthCredSource=USER_INFO`
106
106
107
107
#### MQTT
108
108
109
-
MQTT Test Endpoint have the following form with no optional parameters:
109
+
MQTT Test Endpoint has the following form with no optional parameters:
110
110
111
111
```sh
112
112
mqtt://{mqtt.broker.url:port}/{mqtt.topic.name}
113
113
```
114
114
115
115
#### AMQP
116
116
117
-
AMQP 0.9.1 Test Endpoint have the following form with optional parameters placed just after a `?` and separated using `&` character:
117
+
AMQP 0.9.1 Test Endpoint has the following form with optional parameters placed just after a `?` and separated using the`&` character:
`amqp.destination.type` is used to specify if we shoulf connect to either a queue (use the `q` value) or an exchange speciyfing its type: `d`dor direct, `f` for fanout, `t` for topic, `h` for headers. Then you have to specify either the queue or exchange name in `amqp.detaintion.name`.
123
+
`amqp.destination.type` is used to specify if we should connect to either a queue (use the `q` value) or an exchange specifying its type: `d`for direct, `f` for fanout, `t` for topic, `h` for headers. Then you have to specify either the queue or exchange name in `amqp.detaintion.name`.
124
124
125
125
Depending on the type of destination, you will need additional optional parameters as specified below:
126
126
127
127
| Optional Params | Description |
128
128
| --------------- | ----------- |
129
-
|`routingKey`| Used to specify a routing key for direct or topic exchanges. If not specified the `*` wildcard is used. |
130
-
|`durable`| Flag telling if exchange to connect to is durable or not. Default is `false`. |
131
-
|`h.{header}`| A bunch of headers where name starts with `h.` in order to deal with headers exchange. The `x-match` property is set to `any`to gather the most message as possible. |
129
+
|`routingKey`| Used to specify a routing key for direct or topic exchanges. If not specified, the `*` wildcard is used. |
130
+
|`durable`| Flag telling if the exchange to connect to is durable or not. Default is `false`. |
131
+
|`h.{header}`| A bunch of headers where the name starts with `h.` in order to deal with header exchange. The `x-match` property is set to `any`to gather the most messages as possible. |
132
132
133
133
As an example, you may have this kind of Test Endpoint values: `amqp://rabbitmq.example.com:5672/h/my-exchange-headers?h.h1=h1&h.h2=h2` or `amqp://rabbitmq.example.com:5672/my-vhost/t/my-exchange-topic?routingKey=foo`
134
134
135
135
#### WebSocket
136
136
137
-
WebSocket Test Endpoint have the following form with no optional parameters
137
+
WebSocket Test Endpoint has the following form with no optional parameters
138
138
139
139
```sh
140
140
ws://{ws.endpoint.url:port}/{channel.name}
141
141
```
142
142
143
143
#### NATS
144
144
145
-
NATS Test Endpoint have the following form with no optional parameters:
145
+
NATS Test Endpoint has the following form with no optional parameters:
Amazon Simple Queue Service Test Endpoint have the following form with optional parameters placed just after a `?` and separated using `&` character:
161
+
Amazon Simple Queue Service Test Endpoint has the following form with optional parameters placed just after a `?` and separated using the`&` character:
Amazon Simple Notification Service Test Endpoint have the following form with optional parameters placed just after a `?` and separated using `&` character:
173
+
Amazon Simple Notification Service Test Endpoint has the following form with optional parameters placed just after a `?` and separated using the`&` character:
0 commit comments