Online Exam Quiz

questionQuestion  1 to 30

How do you retrieve the response status code in Rest-Assured?

  • getStatusCode()
  • statusCode()
  • response().status()
  • response().statusCode()
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 do you validate a specific header in a response in Rest-Assured?

  • assertHeader()
  • checkHeader()
  • validateHeader()
  • header()
Mark for review

How can you test APIs with multiple parameters in Rest-Assured?

  • Using queryParams()
  • Using params()
  • Using param()
  • Using query()
Mark for review

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

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

What is the correct method to handle a HEAD request in Rest-Assured?

  • request()
  • head()
  • headRequest()
  • send()
Mark for review

How can you validate an XML response in Rest-Assured?

  • using XML()
  • using XMLPath()
  • using validateXML()
  • using responseXML()
Mark for review

How can you set headers in Rest-Assured?

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

What is the correct method to validate the response time in Rest-Assured?

  • responseTime()
  • validateTime()
  • time()
  • response().time()
Mark for review

How can you validate a JSON response schema in Rest-Assured?

  • validateJSONSchema()
  • body().matchesSchema()
  • assertSchema()
  • matchesJsonSchema()
Mark for review

How can you extract response headers in Rest-Assured?

  • getHeaders()
  • extract().headers()
  • response().getHeaders()
  • headers()
Mark for review

Which of the following is the default HTTP method used by Rest-Assured?

  • DELETE
  • GET
  • POST
  • PUT
Mark for review

How can you validate multiple fields in a JSON response in Rest-Assured?

  • Using body()
  • Using jsonPath()
  • Using validate()
  • Using body().jsonPath()
Mark for review

Which of the following allows you to chain multiple requests in Rest-Assured?

  • execute()
  • chain()
  • requestSpec()
  • request()
Mark for review

How do you pass path parameters in Rest-Assured?

  • addPathParams()
  • parameters()
  • pathParams()
  • addPath()
Mark for review

How do you send a file in a POST request in Rest-Assured?

  • addFile()
  • fileRequest()
  • multiPart()
  • fileBody()
Mark for review

How do you extract a specific field from a JSON response in Rest-Assured?

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

Which of the following is used to check if the response is successful in Rest-Assured?

  • status().success()
  • statusCode().isSuccessful()
  • statusCode(200)
  • response().isOk()
Mark for review

How can you handle a redirect response in Rest-Assured?

  • log().redirect()
  • redirect()
  • follow()
  • FollowRedirects()
Mark for review

How can you validate the response time in Rest-Assured?

  • time()
  • validateTime()
  • responseTime()
  • body().time()
Mark for review

Which of these methods helps extract data from the response body in Rest-Assured?

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

How can you validate the size of a response body in Rest-Assured?

  • validateLength()
  • body().length()
  • body().size()
  • validateBodySize()
Mark for review

Which method is used to assert the content-type of the response in Rest-Assured?

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

What does the statusCode() method validate?

  • Response code
  • Response header
  • Response body
  • Response content
Mark for review

How can you validate a negative scenario (like 404 status) in Rest-Assured?

  • statusCode(404)
  • validateCode(404)
  • assertEquals(404)
  • checkStatus(404)
Mark for review

How do you specify custom timeouts in Rest-Assured?

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

Which method can be used for basic authentication in Rest-Assured?

  • auth().basic()
  • header()
  • authenticate()
  • auth().bearer()
Mark for review

Which response type is the default for Rest-Assured?

  • XML
  • JSON
  • HTML
  • Plain text
Mark for review

How do you handle cookies in Rest-Assured?

  • setCookies()
  • requestCookies()
  • cookies()
  • addCookies()
Mark for review

Which of these is used to define the base URI for all requests in Rest-Assured?

  • setBaseUri()
  • baseUri()
  • setBaseUrl()
  • baseUrl()
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