Rest Assured series - Introduction

In this article we will cover Rest Assured Introduction. If you are working at backend automation, Rest Assured is the framework and library you might be using to automate your APIs. After Selenium, it is perhaps the most popular library ever used. It comes handy with a lot of features and inbuilt libraries to automate your application backend.

Rest Assured Automation 

Rest Assured was founded by Johan Haleby. It is contributed by many people over the years. Rest Assured is sponsored by Parkster.

We will discuss about Rest Assured Components and Features.
  1. Requests - HTTP requests can be sent by the help of RequestSpecification.
  2. Responses
  3. JSON Schema Validation
  4. Status code validations
  5. Body validation

Advantages of Rest Assured

  1. Less code is written
  2. BDD like code-style
  3. Easy CI/CD Integration

Interview Questions

  • What is the difference between Path Parameter and query parameter?
    • Path parameter is also called as URI parameter. It is used to identify specific resource.
    • Query parameter is used to filter/ sort resources.
    • Consider below example for the reference
Suppose you need to retrieve the record of an employee whose id is 15, In this we can use the concept of Path parameter

GET /employee/{id}

Now another use case is you need to retrieve the list of employees but only 10 at a time, in this case, we can use the concept of Query Parameter as shown below -

GET /employee?start=1&size=10


Comments

Post a Comment

Popular posts from this blog

Azure Tutorials Series - Azure Networking

Testing in CI/CD

Azure Tutorials Series - IaaS vs PaaS vs SaaS