Skip to content

vmso/io.bdd_testing_frameworks

Repository files navigation

Test Automation Framework

This framework is an open-source tool to combine API test-automation, UI test-automation, Mobile test-automation into a single, unified framework. It is based on the many steps (key-words), so you can create test cases using these steps even you don't have codding experiences.

Table of Contents

1- Api Test Framework

2- Mobile Project

... preparing

3- Web Project

... preparing

Api Test Framework

Request Steps

1- Defining api request

To define a new api request you can use following step

* Define new request For a check on the implementation of defining a new request step, please visit RequestImp class.

2- Add base url

The following step can be used to add the base url to the request. P.S You should pass the base url as a parameter.

* Add base url <url> For a check on the implementation of adding base url step, please visit UrlImp class.

3- Adding base path (endpoint)

The following step can be used to add the base path to the request.

* Add base path <url> to check implementation of adding base path(endpoint) step, please check UrlImp class.

4- Adding path parameter

The following step can be used to add the path parameter to the request.

* Add base path "/v2/pet/{patId}"

* Add path parameter "patId" = "1234".

You can check more options to add path parameters and review how the steps are implemented by clicking here PathParamImp class.

5- Adding Headers

The following step can be used to add headers to the request.

* Add Headers
    |key            |value              |
    |---------------|-------------------|
    |accept         |application/json   |
    |Content-Type   |application/json   |
    |Cache-Control  |max-age=0          |

You can check more options to add headers and review how the steps are implemented by clicking here HeaderImp class.

6- Query Parameter

The following step can be used to add the query parameters to the request.

* Add query parameter
  |key            |value              |
  |---------------|-------------------|
  |patId          |1234               |
  |category       |dog                |

You can check more options to add query parameters and review how the steps are implemented by clicking here QueryParamImp class.

7- Form Parameter

The following step can be used to add the form parameters to the request.

* Add query parameter
  |key            |value              |
  |---------------|-------------------|
  |patId          |1234               |
  |category       |dog                |

You can check more options to add form data parameter and review how the steps are implemented by clicking here FormParamImp class.

8- Multi form parameter (endpoint)

The following step can be used to add multi form parameter to the request.

* Add to request "key"="value" as multi-part form data

You can check more options to add multi form parameter and review how the steps are implemented by clicking here MultiPartFormDataImp class.

9- Adding file as multi part form param

To adding a file to request, first, you should add the file under the file directory in test resource. Then you can pass the file name as parameter to add to request as multi form parameter with following step.

* Get "<fileName>" file and add to request as multi-part form data

You can check more options to add file as multi-part form data and review how the steps are implemented by clicking here MultiPartFormDataImp class.

9- Adding file as multi part form param

To adding a file to request, first, you should add the file under the file directory in test resource. Then you can pass the file name as parameter to add to request as multi form parameter with following step.

* Get "<fileName>" file and add to request as multi-part form data

You can check more options to add file as multi-part form data and review how the steps are implemented by clicking here MultiPartFormDataImp class.

10- Adding log filter with error status table

The following step can be used to add log filter with error status table.

* Add log filter with errorStatus
  |Status |
  |500    |
  |400    |
  |405    |

You can check more options to add log filter with error status table and review how the steps are implemented by clicking here LogImp class.

11- Adding proxy to the request with URL

The following step can be used to add proxy to the request with URL.

* Add proxy to request with "<url key>"

You can check more options to add proxy to the request with URL and review how the steps are implemented by clicking here ProxyImp class.

11- Adding proxy to the request with string and int key

The following step can be used to add proxy to the request with string and int key.

* Add proxy to request with "<string key>" and "<int key>"

You can check more options to add proxy to the request with string and int key and review how the steps are implemented by clicking here ProxyImp class.

12- Adding relaxed https validation

The following step can be used to add default https certification and relaxed https validation

* Add relaxed HTTPS validation

to check implementation of adding base url step, please visit HttpsImp class.

13- Adding payload/Body as String from file resource

The following step can be used to add the payload/Body as a String from the file under the payloads directory ın test the resource * Add payload as String from resource "<file name>"

You can check more options to add payload/Body as String from file resource and review how the steps are implemented by clicking here RequestBodyImp class.

13- Adding payload/Body as File from file resource

The following step can be used to add payload/Body as File from file resource

* Add payload as file from resource "<file name>"

You can check more options to add payload/Body as File from file resource and review how the steps are implemented by clicking here RequestBodyImp class.

13- Adding payload/Body as Map

The following step can be used to add payload/Body as Map

* Add payload as map

You can check more options to add payload/Body as Map and review how the steps are implemented by clicking here RequestBodyImp class.

13- Adding payload/Body from Scenario Store with key

The following step can be used to add payload/Body from Scenario Store with key

* Add payload from scenario store with "<key>"

You can check more options to add payload/Body from Scenario/Suit/Spec Store with key and review how the steps are implemented by clicking here RequestBodyImp class.

14- Updating the body from stored scenario with key in selector and value shape

The following step can be used to update the body from stored scenario with key in selector and value shape

* Update "<selector>"="<value>" json from stored scenario with key "<key>"

You can check more options to update the body from stored scenario with key and review how the steps are implemented by clicking here RequestBodyImp class.

15- Adding basic authentication method with username and password

The following step can be used to add basic authentication method with username and password

* basic auth with "<username>" and "<password>"

You can check more options to add basic authentication method with username and password and review how the steps are implemented by clicking here AuthImp class.

15- Adding bearer token for bearer authentication

The following step can be used to add bearer authentication with bearer token

* Add Bearer token "<token>"

You can check more options to add bearer authentication method with bearer token and review how the steps are implemented by clicking here AuthImp class.

15- Adding bearer token from scenario store with key

The following step can be used to add bearer authentication with bearer token from scenario store with key

* Add Bearer token from scenario store "<key>"

You can check more options to add bearer authentication method with bearer token from scenario/suit/spec store with key and review how the steps are implemented by clicking here AuthImp class.

15- Storing the value of json file from classpath with key during scenario

The following step can be used to store the value of json file from classpath with key during scenario

* Store json "<file name>"'s value from classpath with "<key>" during scenario

You can check more options to store the value of json file from classpath with key during scenario/suit/spec and review how the steps are implemented by clicking here VariableImp class.

17- Sending the GET http request

The following step can be used to send the get http request

* Get request

You can check more options to send the get http request and review how the steps are implemented by clicking here GetRequestImp class.

18- Sending the POST http request

The following step can be used to send the post http request

* Post request

You can check more options to send the post http request and review how the steps are implemented by clicking here PostRequestImp class.

19- Sending the PUT http request

The following step can be used to send the put http request

* Put request

You can check more options to send the put http request and review how the steps are implemented by clicking here PutRequestsImp class.

20- Sending the DELETE http request

The following step can be used to send the delete http request

* Delete request

You can check more options to send the delete http request and review how the steps are implemented by clicking here DeleteRequestImp class.

21- Sending the PATCH http request

The following step can be used to send the patch http request

* Patch request

You can check more options to send the patch http request and review how the steps are implemented by clicking here PatchRequestImp class.

22- Sending the OPTIONS http request

The following step can be used to send the options http request

* Options request

You can check more options to send the options http request and review how the steps are implemented by clicking here OptionsRequestsImp class.

23- Sending the HEAD http request

The following step can be used to send the head http request

* Head request

You can check more options to send the head http request and review how the steps are implemented by clicking here HeadRequestImp class.

Response Steps

1- Checking if the status code comes as expected

The following step can be used to check if the status code comes as expected

* Check if status code is "<code>"

You can review how the steps are implemented by clicking here StatusCodeImp class.

2- Get the response time as seconds and compare with the provided value

The following step can be used to get the response time as seconds and compare if its less than the value

* Get response time as seconds and compare it, is it less then "<seconds>"?

You can check more options to get the response time to compare with value and review how the steps are implemented by clicking here ResponseTimeImp class.

3- Validate the response json with provided String schema

The following step can be used to validate the response json with provided String schema so that we can see if the service is responding with true json schema model.

* Validate response json with schema "<Schema Name>"

You can check more options to validate the response json with provided String schema and review how the steps are implemented by clicking here JsonSchemaImp class.

4- Validate the stored response json key with stored schema key from scenario data store

The following step can be used to validate the stored response json key with stored schema key from scenario data store.Basically, wen are calling the stored response json and schema key from scenario data store which is prone to gauge framework.

* Validate stored json "<json store key>" response with stored schema "<schema store key>" from scenario data store

You can check more options to validate the stored response json with stored schema key from scenario/suit/spec store and review how the steps are implemented by clicking here JsonSchemaImp class.

5- Storing response body as string with key during scenario

The following step can be used to store response body as string with key during scenario

* Store response as string with "<key>" during scenario

You can check more options to store response body as string with key during scenario/suit/spec and review how the steps are implemented by clicking here ResponseBodyImp class.

6- Storing response body as Json with key during scenario

The following step can be used to store response body as json with key during scenario

* Store response as json with <key> during scenario

You can check more options to store response body as json with key during scenario/suit/spec and review how the steps are implemented by clicking here ResponseBodyImp class.

7- Getting specified selector from response and store it with key during scenario

The following step can be used to get the specified selector from response and store it with during scenario

* Get "<selector>" from response and store it with "<key>" during scenario

You can check more options to get the specified selector from response and store it with during scenario/suit/spec and review how the steps are implemented by clicking here ResponseBodyImp class.

8- Getting specified selector from response and then check if is not null?

The following step can be used to get the specified selector from response and then check if is not null

* Get "<selector>" from response and then check if is not null?

You can check more options to get the specified selector from response and then check if its null or not null and review how the steps are implemented by clicking here ResponseBodyImp class.

9- Getting the specified selector from response and then convert it to list and store it?

The following step can be used to get the specified selector from response and then convert it to list and store it

* Get "<selector>" from the body then convert it to list and store it with "<key>" during the scenario

You can check more options to get the specified selector from response and then convert it to list and store it during scenario/suit/spec and review how the steps are implemented by clicking here ResponseBodyImp class.

10- Getting the specified Json selector value from json response which have filter and filter value then store it

The following step can be used to get the specified Json selector value from json response which have filter and filter value then store it during scenario

* Get "<json select>" from "<json array>" json list which one equals "<filter>=<filterValue>", and store it during Scenario with "<key>"

You can check more options to get the specified Json selector value from json response which have filter and filter value then store it during scenario/suit/spec and review how the steps are implemented by clicking here JsonFilterImp class.

11- Storing key value from the json response as variable

The following step can be used to store key value from the json response as variable during scenario

* Store variable <key> = <value> during scenario"

You can check more options to store key value from the json response as variable during scenario/suit/spec and review how the steps are implemented by clicking here VariableImp class.

11- Storing key value table from the json response as variable

The following step can be used to store key value table from the json response as variable

* Store table as map during scenario with "<key>" "<table>"

You can check more options to store key value table from the json response as variable during scenario/suit/spec and review how the steps are implemented by clicking here VariableImp class.

12- Getting the specified selector value from response then compare it with value if they are equals or not

The following step can be used to get the specified value from response then compare it with if they equals or not

* Get "<selector>" from response and then compare with "<value>", Are they not equals?

You can check more options to get the specified selector value from response then compare it with value if they are equals or not and review how the steps are implemented by clicking here CompareImp class.

13- Getting the specified selector value from response then in terms of containing compare it with the provided value

The following step can be used to get specified value from response then in terms of containing compare it with the provided

* Get "<selector>" from response and then compare with "<value>", is it contains the value?

You can check more options to get the specified selector value from response then in terms of containing compare it with the provided value and review how the steps are implemented by clicking here CompareImp class.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •