SDET: Rest Assured Interview Questions

Carvia Tech | December 04, 2019 | 2 min read | 1,909 views | Rest Assured


In this article we will cover important Rest Assured API Interview Questions for Automation Engineer and developers using Java and Kotlin

Rest Assured: Basic concepts

  • How do you compare Rest Assured with HttpClient or RestTemplate

  • How will you write a simple Rest Assured testcase that validates sample json response?

  • API returns a simple integer array [1, 2, 3], how to test such a response using Rest Assured?

  • How to get all books with price less than 10 from json response?

  • How to treat float and doubles as BigDecimal in json input

  • How to pass given parameters and headers to API call

  • How to set path params in API calls

  • How to test against an expected response code from API call

  • How to extract API responses after validation

  • How will you extract custom node from Json response using JsonPath?

  • How to set cookies in API calls?

  • How to set a JSON body for a POST API call?

  • How to verify cookie, status, headers & content-type in API response

  • How to measure and validate API response time?

  • How to test REST API that requires basic authentication

  • How to test REST API that requires digest authentication

  • How to test REST API that has CSRF enabled

  • How to test REST API that requires OAuth1 authentication

  • How to test OAuth2 protected resource using rest assured

  • How to test handle multi-part form data

  • Testing file upload in Rest Assured

  • How to handle object mapping to JSON - serialization and deserialization

  • You have a fleet of APIs that requires n number of custom headers, how can you avoid duplicating the code for passing the same headers again and again?

  • How to handle session in test?

  • How to relax HTTP validation for invalid certificates? This may be the case for dev environment.

  • how to handle parameters that are already URL encoded?

Rest Assured: Logging and Listeners

  • How will you log network requests - params, body, headers, cookies, etc

  • How to print the response only if error occurs?

  • How to listen to response validation failures? For example, shoot an email when certain validation failure occurs?

Rest Assured with Spring

  • How to test a spring controller using stand alone mode in Rest Assured

  • How to unit test Spring MVC async requests

  • How to test Spring Webflux Reactive Controller using RestAssured

Rest Assured with Kotlin

  • Using Kotlin for writing Rest Assured tests, a sample test

  • What are advantages of writing Rest Assured tests using Kotlin?


Rest Assured:
  1. OAuth2 protected resources in RestAssured Testcases
  2. Basic Authentication in Rest Assured
  3. multi-part file upload using RestAssured
See all articles in Rest Assured
Top articles in this category:
  1. Top 50 SDET Java Programming Interview Questions & Answers
  2. SDET: JUnit interview questions for automation engineer
  3. Top 15 coding problems for SDET Java Interviews
  4. multi-part file upload using RestAssured
  5. REST Assured vs Apache HttpClient and RestTemplate
  6. Basic Authentication in Rest Assured
  7. Commonly used Http methods in RESTful services


Find more on this topic:
SDET Interviews image
SDET Interviews

SDET Java Interview pattern and collection of questions covering SDET coding challenges, automation testing concepts, functional, api, integration, performance and security testing, junit5, testng, jmeter, selenium and rest assured

Last updated 1 week ago


Recommended books for interview preparation:

This website uses cookies to ensure you get the best experience on our website. more info