Skip to content

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.

Overriding variables using the configuration page

c-demo
Key Value Comments
Google https://google.com
t-test
Step Action Target Input Overrides
Navagate goto {{Google}}

Overriding parameters

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.

t-test
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}}
t-dataSheet
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/

Overriding host and path

t-test
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}}
t-dataSheet
Key Value
apiHost dummy.restapiexample.com
apiPath /api/v1/create
Clone this wiki locally