Configuration and Variables
Service level Integration configuration file can be found at:
automation-client ▸ automation ▸ resources ▸ properties ▸ apiConfig.property
RestApi configuration: RestApi
Database configuration: Database
RabbitMQ configuration: RabbitMQ
Kafka configuration: Kafka
Service Bus configuration: Service Bus
Accessing Config Values
Config values can be accessed in test file using <@variable> syntax
We can use the config variables at the following columns:
UriPath
RequestHeader
RequestBody
ExpectedResponse
Storing Values
Values can be stored using <$variable> syntax
Storing values can be done at the OutputParam column
Scope of stored value is the entire csv test file
Values stored in one test can be accessed by the subsequent tests
Predefined Values
Random String
We can use predefined values in our test
These include random values and current time
Random value: <@_RAND5>
Number 12 is the length of the random string. Max length is 31
One random string is generated per test file
eg. <@_RAND5> becomes a9t5a
Time
Time: <@_TIME_20>
Time variable gets the current time UTC timezone
20 is the length of the time string we want
eg. <@_TIME20> becomes 2020-04-23T14:23:33Z
Time Epoch: <@_TIME_MS_13>
Time variable gets the current time UTC timezone
13 is the length of the time string we want
eg. <@_TIME_MS_13> becomes 1587609999109
Time String: <@_TIME_STRING_17>
Time variable gets the current time UTC timezone
17 is the length of the time string we want
eg. <@_TIME_STRING_17> becomes 20200423024730910
Time Modification
Modify Weeks
<@_TIME24+1w> -> adds 1 week
<@_TIME24-1w> -> subtracts 1 week
Modify Days
<@_TIME24+3d> -> adds 3 days
<@_TIME24-3d> -> subtracts 3 days
Modify Hours
<@_TIME24+72h> -> adds 72 hours
<@_TIME24-72h -> subtracts 72 hours
Modify Minutes
<@_TIME24+10m> -> adds 10 minutes
<@_TIME24-10m> -> subtracts 10 minutes
Set Time
Set Month
<@_TIME_24;setMonth:January>
Sets month to January
Command is separated by ";"
Set Day
<@_TIME_24;setDay:Tuesday>
Sets day to Tuesday for current week
Set Time
<@_TIME_24;setTime:14:23:33>
Sets time to 14:23:33
Time Zone
Default time zone is UTC
<@_TIME_24;ZONE:Asia/Kolkata>
Sets timezone to Asia/Kolkata
Time Format
<@_TIME_24;FORMAT:dd-M-yyyy hh:mm:ss>
We set time format to dd-M-yyy hh:mm:ss
We can set the format to any valid format
Combined Time Modifications
We can combine multiple modification commands, separated by ";"
eg. <@_TIME_24+1d;ZONE:Asia/Kolkata;FORMAT:dd-M-yyyy hh:mm:ss>
Last updated
Was this helpful?