Question : What does API stand for?
Application Programming Interface
Application Protocol Integration
Application Program Interface
Advanced Protocol Integration
Application Programming Interface
Question : Which HTTP method is used to retrieve data from the server?
POST
GET
DELETE
PUT
GET
Question : What HTTP status code indicates a successful API request?
200
400
500
201
200
Question : Which type of API does not require constant internet connectivity?
SOAP API
RESTful API
GraphQL API
WebSocket API
SOAP API
Question : In API testing, what is the purpose of a ''mock server''?
To simulate the behavior of an actual server
To secure the API from unauthorized access
To store API documentation
To optimize API performance
To simulate the behavior of an actual server
Question : Which format is commonly used for data exchange in RESTful APIs?
JSON
XML
HTML
YAML
JSON
Question : Which authentication method allows sending credentials with each API request?
OAuth
JWT
Basic Authentication
Digest Authentication
Basic Authentication
Question : What is the role of the ''Authorization'' header in an API request?
To specify the API version
To define the request type (GET, POST, etc.)
To pass authentication credentials
To set the response format (JSON, XML, etc.)
To pass authentication credentials
Question : Which testing type focuses on the flow of data between different APIs?
Integration testing
Unit testing
Functional testing
Performance testing
Integration testing
Question : What does CORS stand for in the context of API testing?
Cross-Origin Resource Sharing
Cross-Origin Request Security
Centralized Origin Resource Sharing
Centralized Origin Request Security
Cross-Origin Resource Sharing
Question : Which tool can be used to capture and inspect API requests and responses?
Postman
Selenium
Jira
Jenkins
Postman
Question : What is the purpose of load testing in API testing?
To identify security vulnerabilities
To check API documentation accuracy
To assess API performance under varying loads
To verify API functionalities in different environments
To assess API performance under varying loads
Question : Which HTTP method is used to update data on the server?
GET
DELETE
PUT
POST
PUT
Question : What does the term ''endpoint'' refer to in API testing?
The data format used for API responses
The URL where API requests are sent
The authentication token for accessing the API
The HTTP status code returned by the API
The URL where API requests are sent
Question : Which API testing method is used to test the functionality of individual API components?
Black-box testing
White-box testing
Grey-box testing
Alpha testing
Black-box testing
Question : What is the purpose of API documentation?
To showcase API security measures
To provide a comprehensive list of API consumers
To explain how to use the API and its endpoints
To highlight API performance metrics
To explain how to use the API and its endpoints
Question : Which testing approach involves running a set of tests repeatedly to find defects?
Agile testing
Ad-hoc testing
Regression testing
Exploratory testing
Regression testing
Question : Which HTTP status code indicates that the requested resource is not found?
404
200
500
201
404
Question : What is the purpose of API versioning?
To improve API security
To support backward compatibility
To reduce API response time
To enable API caching
To support backward compatibility
Question : In API testing, what is the primary focus of security testing?
Validating API functionality
Verifying data integrity
Identifying potential vulnerabilities and threats
Assessing API scalability
Identifying potential vulnerabilities and threats
Question : Which type of API testing validates the interaction between multiple integrated APIs?
Unit testing
Integration testing
Regression testing
System testing
Integration testing
Question : Which tool can be used to automate API tests?
JUnit
Cucumber
JIRA
Jenkins
JUnit
Question : What is the purpose of stress testing in API testing?
To measure API performance under normal conditions
To assess API response time in a controlled environment
To evaluate API behavior under high loads and beyond capacity
To verify API functionalities in different operating systems
To evaluate API behavior under high loads and beyond capacity
Question : Which type of API testing is performed during the early stages of development?
Regression testing
Alpha testing
Acceptance testing
Unit testing
Unit testing
Question : What does ''HTTP'' stand for in API testing?
Hypertext Transfer Protocol
Hyperlink Transfer Protocol
Hypertext Transport Protocol
Hyperlink Transport Protocol
Hypertext Transfer Protocol
Question : What is the primary goal of performance testing in API testing?
To find defects in the API code
To assess the security of the API
To check API functionality against business requirements
To measure API response time and throughput under varying loads
To measure API response time and throughput under varying loads
Question : Which HTTP status code indicates a server error?
200
400
500
201
500
Question : What is the purpose of a ''sandbox environment'' in API testing?
To host the API documentation
To simulate the production environment for testing
To restrict access to specific API consumers
To enable load balancing for API requests
To simulate the production environment for testing
Question : Which testing type focuses on the business requirements and user expectations of an API?
Functional testing
Security testing
Load testing
Usability testing
Functional testing
Question : What is the purpose of API governance?
To manage API access permissions
To ensure the availability of API endpoints
To define guidelines and standards for API development and usage
To test API performance under varying network conditions
To define guidelines and standards for API development and usage
Question : Which HTTP method is used to create new resources on the server?
GET
DELETE
PUT
POST
POST
Question : What is the primary purpose of a ''bearer token'' in API authentication?
To encrypt API requests
To define the API version
To authenticate API consumers
To specify the request type (GET, POST, etc.)
To authenticate API consumers
Question : Which type of API testing focuses on the API's usability and user experience?
Usability testing
Security testing
Performance testing
Regression testing
Usability testing
Question : What is the purpose of boundary value analysis in API testing?
To validate API responses
To determine API response time
To identify defects related to input values at the edges of valid ranges
To optimize API request payload size
To identify defects related to input values at the edges of valid ranges
Question : Which type of API testing verifies the behavior of an API across different browsers and devices?
Cross-browser testing
Performance testing
Security testing
Integration testing
Cross-browser testing
Question : What is the purpose of a ''rate limit'' in API testing?
To limit the number of API requests per minute/hour/day for a specific consumer
To set the response format for API requests
To define the API version
To specify the request type (GET, POST, etc.)
To limit the number of API requests per minute/hour/day for a specific consumer
Question : Which tool can be used to generate synthetic data for API testing?
Postman
Swagger
JMeter
Faker
Faker
Question : What is the purpose of ''negative testing'' in API testing?
To verify the performance of API endpoints
To check the response time of API requests
To test how the API handles invalid input and error conditions
To evaluate the security measures implemented in the API
To test how the API handles invalid input and error conditions
Question : Which HTTP status code indicates a successful resource creation?
200
201
400
500
201
Question : What is the purpose of ''latency testing'' in API testing?
To measure API response time
To validate the correctness of API responses
To assess API security vulnerabilities
To verify API functionalities under high loads
To measure API response time
Question : Which type of API testing focuses on the API's performance, scalability, and responsiveness?
Performance testing
Security testing
Usability testing
Regression testing
Performance testing
Question : What is the purpose of API contract testing?
To validate API functionality
To ensure consistency between API documentation and implementation
To assess API response time under load
To optimize API request payload size
To ensure consistency between API documentation and implementation
Question : Which type of API testing is used to validate the correctness of API responses?
Load testing
Performance testing
Functional testing
Usability testing
Functional testing
Question : What is the purpose of an ''API key'' in API authentication?
To encrypt API requests
To define the API version
To authenticate API consumers
To specify the request type (GET, POST, etc.)
To authenticate API consumers
Question : Which HTTP status code indicates a client error?
200
400
500
201
400
Question : What is the primary purpose of ''regression testing'' in API testing?
To validate API functionality
To identify defects in the API code
To assess API security vulnerabilities
To ensure that new code changes do not affect existing functionalities
To ensure that new code changes do not affect existing functionalities
Question : Which type of API testing is performed to check if the API meets the specified requirements?
Unit testing
Integration testing
System testing
Acceptance testing
Acceptance testing
Question : What is the purpose of ''data-driven testing'' in API testing?
To validate API responses
To assess the security of the API
To test the API's functionality with multiple sets of input data
To verify the API documentation accuracy
To test the API's functionality with multiple sets of input data
Question : Which tool can be used to perform load testing on APIs?
Postman
Swagger
JMeter
Cucumber
JMeter
Question : What is the purpose of ''concurrency testing'' in API testing?
To measure API response time
To assess API security vulnerabilities
To verify API functionalities under varying network conditions
To evaluate the API's behavior when multiple users access it simultaneously
To evaluate the API's behavior when multiple users access it simultaneously
Question : What does the acronym "REST" stand for?
Remote Execution of Stateful Transactions
Representational State Transfer
Resourceful Endpoint Service Technology
Reliable Stateful Transactions
Correct Answer :Representational State Transfer
Question : Which HTTP method is typically used for retrieving a resource in a RESTful API?
POST
GET
PUT
DELETE
Correct Answer :GET
Question : In REST, what does the term "resource" refer to?
A representation of data
An API endpoint
A database table
A programming language
Correct Answer :A representation of data
Question : Which status code indicates a successful HTTP GET request in REST?
200 OK
201 Created
404 Not Found
500 Internal Server Error
Correct Answer :200 OK
Question : What is the primary purpose of the "Content-Type" header in an HTTP request or response?
Specify the type of authentication
Define the character encoding
Indicate the type of data being sent or received
Determine the cache control settings
Correct Answer :Indicate the type of data being sent or received
Question : In RESTful APIs, what is the purpose of the "URI" (Uniform Resource Identifier)?
To define the programming language used
To identify resources and their location
To specify the authentication method
To handle error responses
Correct Answer :To identify resources and their location
Question : Which HTTP method is typically used for creating a new resource in a RESTful API?
POST
GET
PUT
DELETE
Correct Answer :POST
Question : What does the term "idempotent" mean in the context of RESTful APIs?
The ability to create multiple resources with the same identifier
The ability to perform an operation multiple times with the same result as if it were done once
The requirement for strong authentication
The process of handling errors gracefully
Correct Answer :The ability to perform an operation multiple times with the same result as if it were done once
Question : Which HTTP status code is commonly used for resource not found in a RESTful API?
200 OK
201 Created
404 Not Found
500 Internal Server Error
Correct Answer :404 Not Found
Question : What is the purpose of the "OPTIONS" HTTP method in RESTful APIs?
Retrieve resource data
Update a resource
Retrieve metadata information about the resource
Delete a resource
Correct Answer :Retrieve metadata information about the resource
Question : Which authentication method is commonly used in RESTful APIs for secure communication?
OAuth
Basic Authentication
Token Authentication
API Key Authentication
Correct Answer :OAuth
Question : What does HATEOAS stand for in the context of REST architecture?
Hypermedia As The Engine Of Application State
Highly Accessible Transfer Environment for Object Serialization
Hypertext Application Transfer Endpoint Architecture Specification
Heterogeneous Architecture for Transaction Execution Over Asynchronous Systems
Correct Answer :Hypermedia As The Engine Of Application State
Question : Which HTTP method is used to update a resource in a RESTful API?
POST
GET
PUT
PATCH
Correct Answer :PUT
Question : What is the primary purpose of the "Accept" header in an HTTP request?
To indicate the content type of the request
To specify the response format the client can accept
To define the character encoding
To provide authentication credentials
Correct Answer :To specify the response format the client can accept
Question : What is the significance of the "statelessness" principle in RESTful architecture?
Every request from a client contains all the information needed to understand and process the request
The server must store the state of each client to handle subsequent requests
Clients are required to maintain the state of their interactions with the server
Servers must remember the state of each resource to handle requests efficiently
Correct Answer :Every request from a client contains all the information needed to understand and process the request
Question : Which HTTP method is used to partially update a resource in a RESTful API?
POST
GET
PUT
PATCH
Correct Answer :PATCH
Question : What is the purpose of the "ETag" header in HTTP responses?
To specify the encoding of the response
To provide caching information
To indicate the type of authentication used
To define the character set of the response
Correct Answer :To provide caching information
Question : In REST, what does the term "Uniform Interface" refer to?
A standardized way to authenticate requests
A set of conventions that, when applied to resources, results in a uniform and predictable way to interact with those resources
A specific programming language used for API development
A mechanism for encrypting data during transmission
Correct Answer :A set of conventions that, when applied to resources, results in a uniform and predictable way to interact with those resources
Question : Which status code indicates a client error in a RESTful API, typically due to malformed requests?
200 OK
201 Created
400 Bad Request
404 Not Found
Correct Answer :400 Bad Request
Question : What is the purpose of the "Cross-Origin Resource Sharing" (CORS) mechanism in the context of RESTful APIs?
To prevent the use of API resources by unauthorized clients
To enable or restrict access to resources based on the origin of the requesting client
To encrypt data transmitted between the client and server
To define the format of the resource representation
Correct Answer :To enable or restrict access to resources based on the origin of the requesting client
Question : What is REST Assured primarily used for in Java?
Database operations
Front-end development
API automation testing
File manipulation
Correct Answer :API automation testing
Question : Which HTTP method is commonly used with REST Assured to perform a GET request?
post()
get()
put()
delete()
Correct Answer :get()
Question : In REST Assured, what is the purpose of the given(), when(), and then() methods in the testing flow?
Defining request parameters, making the request, and validating the response
Handling exceptions, logging, and printing output
Initializing variables, running tests, and generating reports
Creating test data, executing test cases, and cleaning up resources
Correct Answer :Defining request parameters, making the request, and validating the response
Question : Which of the following is used to set the base URI for REST Assured tests?
base()
baseUri()
setBaseURI()
setBase()
Correct Answer :baseUri()
Question : How do you specify the query parameters in a REST Assured request?
Using the queryParams() method
Appending them to the URL
Using the queryParam() method
Using the params() method
Correct Answer :Using the queryParam() method
Question : What is the purpose of the extract() method in REST Assured?
Extracting data from the request body
Extracting data from the response body
Extracting data from the headers
Extracting data from the URL
Correct Answer :Extracting data from the response body
Question : Which method is used to send a POST request with JSON payload in REST Assured?
post()
sendPost()
postJSON()
sendJSON()
Correct Answer :post()
Question : How do you validate a JSON response using REST Assured?
Using validate()
Using assert()
Using check()
Using verify()
Correct Answer :Using validate()
Question : What is the purpose of the statusCode method in REST Assured?
Setting the HTTP status code for a request
Extracting the HTTP status code from a response
Verifying the expected HTTP status code
Ignoring the HTTP status code
Correct Answer :Verifying the expected HTTP status code
Question : Which method is used to send a DELETE request in REST Assured?
delete()
sendDelete()
remove()
sendRemove()
Correct Answer :delete()
Question : How do you handle authentication in REST Assured for an API that requires a token?
Using the auth() method
Appending the token to the URL
Using the header() method
Using the oauth() method
Correct Answer :Using the header() method
Question : What is the purpose of the contentType() method in REST Assured?
Setting the character encoding
Specifying the expected response content type
Defining the request body content type
Configuring the request timeout
Correct Answer :Defining the request body content type
Question : How do you perform path parameter substitution in REST Assured?
Using the pathParam() method
Appending them to the URL
Using the param() method
Using the setPathParam() method
Correct Answer :Using the pathParam() method
Question : Which method is used to set a request header in REST Assured?
setHeader()
header()
addHeader()
requestHeader()
Correct Answer :header()
Question : What is the purpose of the log() method in REST Assured?
Logging request details
Logging response details
Logging both request and response details
Controlling log levels
Correct Answer :Logging both request and response details
Question : Which method is used to perform assertions on the response body in REST Assured?
assertThat()
verifyThat()
checkThat()
expectThat()
Correct Answer :assertThat()
Question : What does the hasItems() method do in REST Assured?
Checks if the response contains specific items
Adds items to the request
Validates the HTTP status code
Sets the base URI
Correct Answer :Checks if the response contains specific items
Question : How do you perform content verification in REST Assured for a response containing JSON data?
Using content().json()
Using content().verifyJson()
Using check().jsonContent()
Using verify().json()
Correct Answer :Using content().json()
Question : What is the purpose of the relaxedHTTPSValidation() method in REST Assured?
Enabling strict HTTPS validation
Disabling HTTPS validation
Relaxed validation for HTTPS certificates
Specifying a custom SSL context
Correct Answer :Relaxed validation for HTTPS certificates
Question : Which method is used to set the base path for REST Assured tests?
basePath()
setPath()
withPath()
baseURI()
Correct Answer :basePath()
Question : What is the purpose of the formParam() method in REST Assured?
Sending data in JSON format
Setting form parameters in a request
Verifying form fields in the response
Generating form-based authentication tokens
Correct Answer :Setting form parameters in a request
Question : How do you perform response time validation in REST Assured?
Using check().responseTime()
Using assertThat().responseTime()
Using validate().responseTime()
Using verify().responseTime()
Correct Answer :Using validate().responseTime()
Question : What is the purpose of the rootPath() method in REST Assured?
Setting the base path for requests
Defining the root path for JSON responses
Configuring the root directory for the project
Setting the context root for servlets
Correct Answer :Defining the root path for JSON responses
Question : Which method is used to perform XPath-based validation on XML responses in REST Assured?
assertThat().xmlPath()
validate().xpath()
check().xml()
verify().xpath()
Correct Answer :validate().xpath()
Question : What is the purpose of the with() method in REST Assured?
Configuring request parameters
Handling exceptions
Setting authentication details
Initializing test data
Correct Answer :Configuring request parameters
Question : Which method is used to perform assertions on cookies in REST Assured?
assertThat().cookie()
verify().cookies()
check().cookie()
expect().cookie()
Correct Answer :assertThat().cookie()
Question : How do you perform response body content validation in REST Assured for XML data?
Using content().verifyXml()
Using assertThat().xml()
Using check().xmlContent()
Using verify().content().xml()
Correct Answer :Using assertThat().xml()
Question : What is the purpose of the urlEncodingEnabled() method in REST Assured?
Enabling URL encoding for request parameters
Disabling URL encoding for request parameters
Configuring the URL encoding format
Setting the default encoding for URLs
Correct Answer :Disabling URL encoding for request parameters
Question : Which method is used to perform response header validation in REST Assured?
assertThat().header()
verify().headers()
check().responseHeader()
expect().header()
Correct Answer :assertThat().header()
Question : What is the purpose of the redirects() method in REST Assured?
Configuring the number of allowed redirects
Disabling HTTP redirects
Configuring the redirection strategy
Setting the URL for redirection
Correct Answer :Configuring the number of allowed redirects
Comments
Post a Comment