-1

Can someone please explain how rest assured works internally on performing the API testing. I am just aware that it uses Groovy under the hood. Basically, I would like to understand the architecture of Rest Assured in detail. Thanks

MrNolan
  • 154
  • 1
  • 4
  • 13

2 Answers2

0

The only thing I can tell you for sure - as well as all REST-clients, it uses cURL for request sending.

Villa_7
  • 508
  • 4
  • 14
-1

Rest Assured is a Java library that provides a convenient and easy-to-use API for testing RESTful web services. It's built on top of other popular Java libraries like Apache HTTP Client, Hamcrest, and JSONPath.

Here's a high-level overview of the architecture of Rest Assured:

Request Configuration: In this stage, you can specify the details of the request, such as the HTTP method, endpoint URL, request parameters, headers, and request body.

Request Execution: In this stage, Rest Assured sends the configured request to the server and retrieves the response.

Response Validation: In this stage, Rest Assured provides various methods to validate the response, such as checking the HTTP status code, response headers, and response body.

Result Extraction: In this stage, Rest Assured allows you to extract specific values from the response body and store them in variables for further use.

Overall, Rest Assured provides a simple and straightforward API for testing RESTful web services, making it easier for developers to write and maintain test cases. By abstracting away the underlying complexities of HTTP requests and responses, it enables you to focus on testing the business logic of your application.