-
Notifications
You must be signed in to change notification settings - Fork 16
How to override variables
David_Chau edited this page Feb 7, 2019
·
4 revisions
This section describes the various ways to override variables in the Target, Input and Overrides columns from test data excel sheet. Overriding provides a user to change a given variable during the testing phase. The purpose of this feature is to provide users a way easly replace variables in one test file.
Key | Value | Comments |
---|---|---|
https://google.com |
Step | Action | Target | Input | Overrides |
---|---|---|---|---|
Navagate | goto | {{Google}} |
By allowing overriding parameters we are able to create a more dynamic way to preform various service calls. For this to be possible to have to define our yaml file. For example we would like to retreve multiple employee information.
Step | Action | Target | Input | Overrides |
---|---|---|---|---|
GET call from customer api | serviceCall | customer.api.v1.employee.{id} | GET | path::id::{{empId1}} |
GET call from customer api | serviceCall | customer.api.v1.employee.{id} | GET | path::id::{{empId2}} |
Key | Value |
---|---|
empId1 | 123456 |
empId2 | 456789 |
More information/examples on how to define diffrent parameters in a swagger file can be found here: https://swagger.io/docs/specification/describing-parameters/
Step | Action | Target | Input | Overrides |
---|---|---|---|---|
Override dynamically on sample api's host and endpoint | serviceCall | sample.api.create | POST | endpoint::host::{{apiHost}}::path::{{apiPath}} |
Override dynamically on sample api's host | serviceCall | sample.api.create | POST | endpoint::host::{{apiHost}} |
Override dynamically on sample api's endpoint | serviceCall | sample.api.create | POST | endpoint::path::{{apiPath}} |
Key | Value |
---|---|
apiHost | dummy.restapiexample.com |
apiPath | /api/v1/create |