Online Exam Quiz

questionQuestion  1 to 30

Which method in Rest-Assured is used to send a GET request?

  • get()
  • send()
  • request()
  • fetch()
Mark for review

What method would you use to set a timeout for requests in Rest-Assured?

  • timeout()
  • timeoutConfiguration()
  • setTimeout()
  • requestTimeout()
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 assertion checks the content type of a response in Rest-Assured?

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

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

  • put()
  • update()
  • send()
  • putRequest()
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 validate a negative scenario (like 404 status) in Rest-Assured?

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

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

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

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

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

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

  • extract()
  • body()
  • response()
  • get()
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 send form data in a POST request using Rest-Assured?

  • using formParams()
  • using body()
  • using params()
  • using request()
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

Which response type is the default for Rest-Assured?

  • XML
  • JSON
  • HTML
  • Plain text
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

Which of the following is used to perform validation of JSON Schema in Rest-Assured?

  • validateSchema()
  • matchesJsonSchema()
  • assertSchema()
  • checkSchema()
Mark for review

How can you send custom HTTP headers in Rest-Assured?

  • setHeaders()
  • addCustomHeaders()
  • customHeaders()
  • headers()
Mark for review

How do you assert that a response contains a specific value in Rest-Assured?

  • response().contains()
  • body().contains()
  • body().assertContains()
  • 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

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

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

How do you handle environment variables in Rest-Assured?

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

What is Rest-Assured?

  • API testing framework for REST services
  • Framework for web testing
  • API testing for SOAP services
  • UI testing tool
Mark for review

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

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

How do you set headers in Rest-Assured?

  • addHeader()
  • headers()
  • requestHeaders()
  • setHeaders()
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 is the correct method to handle authentication in Rest-Assured?

  • login()
  • authenticate()
  • credentials()
  • auth()
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

Which method in Rest-Assured is used to send a POST request?

  • post()
  • send()
  • request()
  • put()
Mark for review

What does the statusCode() method validate?

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

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

  • @Before
  • @Request
  • @Test
  • @RestAssured
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