Ionia Snippet
Ionia is a .NET Core project developed by ÇicekSepeti test automation team. It provides comprehensive api tests by using the BDD approach. Ionia project allows to making the following features:
- Sending HTTP requests
- Checking response status code
- Checking response body
This snippet contains the sentences used in the Ionia test automation project. Creates test cases using auto-completion.
Test cases should be written in the .feature file. You can see the format(prefix) and usage(description) of the sentences in below.
"prefix": "Given I prepare url 'url' and method 'httpMethod'",
"description": "Preparing url and http method before sending request"
"prefix": "When I prepare request body 'key' from 'fileName' json file with following data:",
"description": "Preparing request bodies with Keys from json file by overriding datas from Table"
"prefix": "When I prepare request body 'key' from 'fileName' json file",
"description": "Preparing request bodies with Keys from json file"
"prefix": "When I set date time 'parameterName' parameter with following data:",
"description": "Setting date time parameters by declaring TimeUnit TimeValue and Format datas
Parameters that 'timeUnit' takes:
'Year,Month,Day,Hour,Minute'
Parameters that 'timeValue' can take:
'-3' sets the date to 3 'timeUnit' (Year,Day and etc.) ago
'7' sets the date to 7 'timeUnit' (Year,Day and etc.) later
'0' sets the date to 'Now' (Anyone of Year,Day and etc.)
Parameters that 'format' takes:
'format:yyyy-MM-dd , result: 2021-12-01'
'format:yyyy-MM-ddTHH\\:mm , result: 2022-01-24T08:47'
'format:dd/MM/yyyy , result: 24/01/2022'
'format:dd/MM/yyyyTHH\\:mm , result: 24/01/2022T08:50'"
"prefix": "When I prepare request headers with following data:",
"description": "Sending request headers inside table"
"prefix": "When I prepare request params with following data:",
"description": "Sending request query params inside table"
"prefix": "When I send request",
"description": "Send request to localhost:5000"
"prefix": "When I send sqlapi request with 'retryCount' retry count",
"description": "The request will be sent to sqlapi:8033/sql as many times as the number of repetitions."
"prefix": "When I send hangfire request and get stats",
"description": "Send request to hangfire get stats (succeeded:count, failed:count, deleted:count)"
"prefix": "When I send hangfire request until the jobs are done every '(.*)' milliseconds",
"description": "Send request to hangfire at specific millisecond intervals until the processing:count, scheduled:count, awaiting:count will be zero and until one of the values of succeeded:count, failed:count, deleted:count are diffirent"
"prefix": "When I send mountebank request",
"description": "Send request to http://mountebank:2525/imposters"
"prefix": "When I send hangfire request",
"description": "Send request to hangfire until the processing:count, scheduled:count, awaiting:count will be zero"
"prefix": "When I send redis request",
"description": "Send request to http://redisproxy:7379"
"prefix": "When I send elastic search request with 'retryCount' retry count",
"description": "The request will be sent to http://elasticsearch:9200 as many times as the number of repetitions."
"prefix": "Then I expect to see status code is 'statusCode'",
"description": "Control of response's status code"
"prefix": "Then I expect to see 'expectedParameter' parameter equal to the 'expectedValue' value",
"description": "Equality control of expected parameter's value"
"prefix": "Then I expect to see 'expectedParameter' parameter not equal to the 'expectedValue' value",
"description": "Not equality control of expected parameter's value"
"prefix": "Then I expect to see 'expectedParameter' parameter equal to the one of the 'expectedValue1,expectedValue2' values",
"description": "Equality control of one of the expected parameter's value"
"prefix": "Then I expect to see 'expectedParameter' parameter includes the 'expectedValue' value",
"description": "Controling response includes expected parameter's value"
"prefix": "Then I expect to see 'expectedParameter' parameter to be null",
"description": "Control if expected parameter is null"
"prefix": "Then I expect to see 'expectedParameter' parameter to be not null",
"description": "Control if expected parameter is not null"
"prefix": "Then I expect to see response body to be null",
"description": "Control if response body is null"
"prefix": "Then I expect to see response body to be empty",
"description": "Control if response body is empty"
"prefix": "Then I expect to see 'parameter' parameter length equal to the 'expectedLength'",
"description": "Equality control of expected parameter's length"
"prefix": "Then I expect to see response values with following data:",
"description": "Control response values with data's from table"
"prefix": "Then I expect to see date time 'parameter1,parameter2' parameters with following data:",
"description": "Control of date time parameters by declaring TimeUnit TimeValue and Format datas
Parameters that 'timeUnit' takes:
'Year,Month,Day,Hour,Minute'
Parameters that 'timeValue' can take:
'-3' sets the date to 3 'timeUnit' (Year,Day and etc.) ago
'7' sets the date to 7 'timeUnit' (Year,Day and etc.) later
'0' sets the date to 'Now' (Anyone of Year,Day and etc.)
Parameters that 'format' takes:
'format:yyyy-MM-dd , result: 2021-12-01'
'format:yyyy-MM-ddTHH\\:mm , result: 2022-01-24T08:47'
'format:dd/MM/yyyy , result: 24/01/2022'
'format:dd/MM/yyyyTHH\\:mm , result: 24/01/2022T08:50'"
"prefix": "When I set date time 'params' request params with following data:",
"description": "Setting date time query params by declaring TimeUnit TimeValue and Format datas
Params that 'timeUnit' takes:
'Year,Month,Day,Hour,Minute'
Params that 'timeValue' can take:
'-3' sets the date to 3 'timeUnit' (Year,Day and etc.) ago
'7' sets the date to 7 'timeUnit' (Year,Day and etc.) later
'0' sets the date to 'Now' (Anyone of Year,Day and etc.)
Params that 'format' takes:
'format:yyyy-MM-dd , result: 2021-12-01'
'format:yyyy-MM-ddTHH\\:mm , result: 2022-01-24T08:47'
'format:dd/MM/yyyy , result: 24/01/2022'
'format:dd/MM/yyyyTHH\\:mm , result: 24/01/2022T08:50'"
"prefix": "Then I expect to see all 'parameter' parameters are equal to 'value'",
"description": "Controling all response expected parameter's value
parameter example is 'campaigns[*].productList[*].discountPrice'"
"prefix": "Then I expect to see all 'parameter' parameters are not equal to 'value'",
"description": "Controling all response not equal expected parameter's value
parameter example is 'campaigns[*].productList[*].discountPrice'"
"prefix": "Then I expect to see all 'parameter' parameters are not include the 'value' value",
"description": "Controling all response not include expected parameter's value
parameter example is 'campaigns[*].productList[*].discountPrice'"
"prefix": "Then I expect to see 'parameter1,parameter2' parameters of request body in mountebank with following data:",
"description": "Checking the response body object from mountebank request with expected parameter. Then control of response object's http component values from Table"
"prefix": "Then I expect to see 'parameter1,parameter2' parameters of request 'requestOption' in mountebank with following data:",
"description": "Checking the selected response field object from mountebank request with expected parameter. Then control of response object's http component values from Table"
"prefix": "Then I expect to see 'parameter1,parameter2' parameters of request body in mountebank",
"description": "Control of the response body object from mountebank request with expected parameters"
"prefix": "Then I expect to not see 'parameter1,parameter2' parameters of request 'requestOption' in mountebank",
"description": "Control that parameters are not sent at the requestOption (path, query, headers, body) in mountebank request"
"prefix": "Then I expect to see 'parameter1,parameter2' parameters of request body 'expectedRequestCount' times in mountebank",
"description": "Control for the count of request body object from mountebank request with expected parameters"
"prefix": "Then I expect to see 'parameter1,parameter2' parameters of request 'requestOption' 'expectedRequestCount' times in mountebank",
"description": "Control for the count of request requestOption (path, query, headers, body) object from mountebank request with expected parameter"
"prefix": "When I wait for 'ms' milliseconds",
"description": "Wait for x milliseconds. For example: 100,2000 or 50000"
"prefix": "Then I do CDC test for response values with following data:",
"description": "Cdc testing for response value with data's from table.
For example:
| items[0].isSuccess | Boolean |
| [0].BranchId | Integer |
| chats.message | String |"
"prefix": "Then I expect to see 'parameter' parameter children count is 'expectedCount' for CDC testing",
"description": "Control of the parameter's children count for CDC testing"
"prefix": "Then I expect to see microservice endpoint count is 'endpointCount'",
"description": "Control of the microservice endpoints count"
"prefix": "Then I expect to see 'swaggerPath' endpoint count is 'endpointCount' for microservice",
"description": "Control of the microservice endpoints count according to swagger path"
"prefix": "Then I expect to see response body is equal to 'key' from 'fileName' json file",
"description": "Lodash control by getting expected response from json file with key"
"prefix": "Then I expect to see response body is equal to 'key' from 'fileName' json file except 'parameter1,parameter2' parameters",
"description": "Lodash control except selected parameters by getting expected response from json file with key"
"prefix": "Then I expect to see response body is equal to 'key' from 'fileName' json file with following data:",
"description": "Lodash control with date time settings by getting expected response from json file with key.
Parameters that 'timeUnit' takes:
'Year,Month,Day,Hour,Minute'
Parameters that 'format' takes:
'format:yyyy-MM-dd,result: 2021-12-01'"
"prefix": "When I remove 'parameter1,parameter2' parameters of request body 'key' from 'fileName' json file",
"description": "Preparing request bodies with Keys from json file by removing request parameters
This step can take one or more parameters.
For Example:
When I remove 'description,websiteId,countryId' parameters of request body 'VouchersHeaderBody' from 'Request' json file
When I remove 'platformType' parameters of request body 'CargoBody' from 'Request' json file"
"prefix": "When I remove 'parameter1,parameter2' parameters of the 'key' request body from the 'fileName' json file and update the following data:",
"description": "Preparing request bodies with Keys from json file by removing and updating request parameters
This step can take one or more parameters.
For Example:
When I remove 'description,websiteId,countryId' parameters of the 'VouchersHeaderBody' request body from the 'Request' json file and update the following data:
When I remove 'platformType' parameters of the 'CargoBody' request body from the 'Request' json file and update the following data:"
"prefix": "Then I expect to see response body has property 'expectedParameter'",
"description": "Control if response body has property like 'expectedParameter'"
"prefix": "Then I expect to see response body has not property 'expectedParameter'",
"description": "Control if response body hasn't property like 'expectedParameter'"
"prefix": "Then I expect to see length of 'parameter' parameter filtered by 'filter' equal to the 'expectedLength'",
"description": "Control of filtered response body's length.
Example for filter format : @.id==1008 || @.name=='Güller (L1-NC)'.
Url for jsonPath format: https://tools.ietf.org/id/draft-goessner-dispatch-jsonpath-00.html"
"prefix": "Then I expect to see 'parameter' parameter filtered by 'filter' with following data:",
"description": "Control of filtered response body's parameters value"
"prefix": "Then I expect to see 'parameter' parameter filtered by 'filter' response is equal to 'key' from 'fileName' json file",
"description": "Lodash control of filtered response body's parameters value.
Example for parameter format : 'categories'
Example for filter format : @.id==255 || @.id==216
If you want to filter the entire array in responseBody, parameter is passed empty string : ' '
Url for jsonPath format: https://tools.ietf.org/id/draft-goessner-dispatch-jsonpath-00.html"
"prefix": "Then I expect to see 'parameter' parameter filtered by 'filter' response is equal to 'key' from 'fileName' json file except 'parameter1,parameter2' parameters",
"description": "Lodash control except selected parameters of filtered response body's parameters value.
Example for parameter format : 'categories'
Example for filter format : @.id==255 || @.id==216
Example for except parameter : '[0].Value, [1].Value'
If you want to filter the entire array in responseBody, parameter is passed empty string : ' '
Url for jsonPath format: https://tools.ietf.org/id/draft-goessner-dispatch-jsonpath-00.html"
"prefix": "Then I expect the 'expectedParameter' parameter length of 'count' as a result of filtering the 'parameter' array by 'filter'",
"description": "Control the length of a parameter after a filtered response
Example for parameter format : 'categories'
Example for filter format : @.id==255 || @.id==216
Example for except parameter : '[0].Value, [1].Value'
If you want to filter the entire array in responseBody, parameter is passed empty string : ' '
Url for jsonPath format: https://tools.ietf.org/id/draft-goessner-dispatch-jsonpath-00.html"
"prefix": "Then I expect the response generated by filtering the 'parameter' parameter with 'filter' to has not 'expectedParameter' property",
"description": "Control if filtered response body hasn't property like 'expectedParameter'
Example for parameter format : 'categories'
Example for filter format : @.id==255 || @.id==216
Example for except parameter : '[0].Value, [1].Value'
If you want to filter the entire array in responseBody, parameter is passed empty string : ' '
Url for jsonPath format: https://tools.ietf.org/id/draft-goessner-dispatch-jsonpath-00.html"
"prefix": "Then I expect to see response parameter count is 'parameterCount'",
"description": "Control of response's parameter count"
"prefix": "Then I expect to see 'expectedParameter' parameter's count is equal to the 'expectedCount'",
"description": "Control of expected parameter's count.
Note: If response is an array, not an object, fill expectedParameter with -> '' "
"prefix": "Then I expect to see 'expectedParameter' parameter's count is greater than or equal to the 'expectedCount'",
"description": "Control of expected parameter's count is greater than or equal. \n Note: If response is an array, not an object, fill expectedParameter with -> '' "
"prefix": "Then I expect to see 'expectedParameter' parameter's count is less than or equal to the 'expectedCount'",
"description": "Control of expected parameter's count is less than or equal. \n Note: If response is an array, not an object, fill expectedParameter with -> '' "
"prefix": "Then I expect to see all 'parameter' parameters are include the 'value' value",
"description": "Controling all response contains the expected parameter's value\n parameter example is 'campaigns[*].productList[*].discountPrice'"
"prefix": "Then I expect to see at least one of 'expectedParameter' parameter is equal to the 'expectedValue' value",
"description": "Control of at least one expected parameter's value is equal to the expected value"
"prefix": "Then I expect to see 'expectedParameter' parameter's count of array is equal to the 'expectedCount'",
"description": "Control of expected parameter's count for array. \n For Example: For checking the object count inside array, you can use the [*] json path"
"prefix": "Then I expect to see 'expectedParameter' parameter to be guid format",
"description": "Control the guid format of expectedParameter"
"prefix": "Then I expect to see response values greater than or equals with following data:",
"description": "Response values are greater than or equals with data's from table.
For example:
| items[0].invoiceType | 1 |
| [0].PageSize | 3 |
| chats.count | -5 |"
"prefix": "Then I expect to see response values less than or equals with following data:",
"description": "Response values are less than or equals with data's from table.
For example:
| items[0].invoiceType | 1 |
| [0].PageSize | 3 |
| chats.count | -5 |"
"prefix": "When I set for 'expectedParameter' parameter to the global variable",
"description": "Setting response parameter to the global variable. For example: [0].VerificationCode"
"prefix": "Then I expect to see all 'parameter' parameters count is equal to 'parameterCount'",
"description": "Controling all response expected parameter's count
parameter example is 'campaigns[*].productList[*].discountPrice'"