Online Exam Quiz

questionQuestion  1 to 30

How do you specify custom timeouts in Rest-Assured?

  • timeout()
  • requestTimeout()
  • timeLimit()
  • setTimeout()
Mark for review

How do you validate the response body in Rest-Assured?

  • validateBody()
  • response()
  • body()
  • validateResponse()
Mark for review

What is the default port used by Rest-Assured for testing APIs?

  • 8080
  • 9090
  • 80
  • 5000
Mark for review

What is the method used to set query parameters in Rest-Assured?

  • queryParams()
  • setQuery()
  • addQuery()
  • params()
Mark for review

What method is used to send a PATCH request in Rest-Assured?

  • patchRequest()
  • patch()
  • request()
  • send()
Mark for review

How do you set headers in Rest-Assured?

  • addHeader()
  • headers()
  • requestHeaders()
  • setHeaders()
Mark for review

What does the extract().response() method do in Rest-Assured?

  • Extracts raw data from the response
  • Extracts JSON data from response
  • Extracts status code
  • Extracts HTTP headers
Mark for review

Which of these assertions is used to verify the value of a response header in Rest-Assured?

  • header()
  • headers()
  • assertHeader()
  • getHeaders()
Mark for review

Which of the following does NOT require an authentication header in Rest-Assured?

  • OAuth 2.0
  • Basic Authentication
  • Bearer Token
  • No authentication
Mark for review

What is the default behavior of Rest-Assured when the response is empty?

  • Throws an error
  • Returns null
  • Returns empty string
  • Returns empty response
Mark for review

How do you validate a negative status code in Rest-Assured?

  • checkStatus(404)
  • assertStatusCode(404)
  • statusCode(404)
  • status().validate(404)
Mark for review

How do you handle environment variables in Rest-Assured?

  • environment()
  • setSystemProperties()
  • setVars()
  • setEnvironment()
Mark for review

Which of the following libraries is required to use Rest-Assured?

  • TestNG
  • Apache HttpClient
  • JUnit
  • All of the above
Mark for review

How can you handle a custom response header in Rest-Assured?

  • response().header()
  • getHeader()
  • extract().header()
  • header()
Mark for review

What does the jsonPath() function do in Rest-Assured?

  • Checks response status
  • Parse JSON response
  • Sends a request
  • Extracts response code
Mark for review

How do you validate the HTTP status code in Rest-Assured?

  • assertEquals()
  • statusCode()
  • validateCode()
  • validateResponse()
Mark for review

How can you modify the request headers dynamically in Rest-Assured?

  • modify()
  • setHeaders()
  • addHeader()
  • headers()
Mark for review

How do you test an API with a response in XML format?

  • Using XMLPath()
  • Using jsonPath()
  • Using XML()
  • Using raw()
Mark for review

How can you send data in the body of a POST request in Rest-Assured?

  • requestBody()
  • body()
  • sendBody()
  • setBody()
Mark for review

Which of the following methods is used to handle HTTP methods in Rest-Assured?

  • request()
  • sendRequest()
  • execute()
  • response()
Mark for review

How can you extract a value from the response body in Rest-Assured?

  • getBody()
  • extract()
  • body()
  • response()
Mark for review

Which of these annotations is used in Rest-Assured for JUnit testing?

  • @Before
  • @Request
  • @Test
  • @RestAssured
Mark for review

How do you configure Rest-Assured to use a custom serializer?

  • setConfig()
  • setSerializer()
  • customConfig()
  • setCustomSerializer()
Mark for review

Which assertion checks the content type of a response in Rest-Assured?

  • type()
  • assertContent()
  • contentType()
  • responseType()
Mark for review

How do you configure Rest-Assured to log request and response?

  • log().all()
  • log().response()
  • log().request()
  • log().body()
Mark for review

How do you handle multiple values in the response body?

  • response().getList()
  • extract().json()
  • body().jsonPath()
  • body().list()
Mark for review

How do you send a PUT request using Rest-Assured?

  • put()
  • update()
  • send()
  • putRequest()
Mark for review

What is the default base URL in Rest-Assured?

  • localhost:8080
  • No default, must be set manually
  • 127.0.0.1
  • api.example.com
Mark for review

How can you set headers in Rest-Assured?

  • Using headers()
  • Using setHeaders()
  • Using setHeader()
  • Using addHeader()
Mark for review

Which function is used to extract data from a JSON response in Rest-Assured?

  • jsonPath()
  • extract()
  • response()
  • status()
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review