Online Exam Quiz

questionQuestion  1 to 30

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

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

How do you specify custom timeouts in Rest-Assured?

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

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

  • Using setSerializer()
  • Using customSerializer()
  • Using config()
  • Using customConfig()
Mark for review

What is used to handle OAuth 1.0 authentication in Rest-Assured?

  • auth().oauth()
  • auth().oauth1()
  • auth().token()
  • auth().bearer()
Mark for review

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

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

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

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

What is the correct way to validate an array element in the JSON response using Rest-Assured?

  • jsonPath().getList()
  • jsonPath().getArray()
  • jsonPath().get()
  • jsonPath().toList()
Mark for review

Which annotation is used in Rest-Assured for making assertions in JUnit?

  • @Test
  • @Given
  • @When
  • @Assert
Mark for review

What type of testing is Rest-Assured mainly used for?

  • UI testing
  • API testing
  • Load testing
  • Database testing
Mark for review

How can you run a single Rest-Assured test case?

  • Use test() method
  • Use TestNG or JUnit annotations
  • Through CLI
  • Using runner()
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

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

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

Which class in Rest-Assured is used to initiate requests?

  • RequestSpecification
  • Response
  • RequestFactory
  • ResponseBuilder
Mark for review

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

  • jsonPath()
  • extract()
  • response()
  • status()
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 handle a redirect response in Rest-Assured?

  • log().redirect()
  • redirect()
  • follow()
  • FollowRedirects()
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 validate the response body in Rest-Assured?

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

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

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

What function is used to specify the query parameters in Rest-Assured?

  • addParams()
  • requestParams()
  • setParams()
  • queryParams()
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

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

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

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

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

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

Which of the following is the base URL for Rest-Assured tests?

  • Base URI
  • Endpoint
  • Base API
  • Request URL
Mark for review

Which method in Rest-Assured is used for setting the base URI?

  • baseUri()
  • baseUrl()
  • setBase()
  • setURI()
Mark for review

Which of the following is used to validate the response body in Rest-Assured?

  • body()
  • validateBody()
  • checkBody()
  • assertBody()
Mark for review

How can you set up an authentication token in Rest-Assured?

  • auth().oauth2()
  • auth().token()
  • auth().bearer()
  • auth().basic()
Mark for review

How can you handle cookies in Rest-Assured?

  • Using cookies()
  • Using cookie()
  • Using setCookies()
  • Using addCookies()
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