API IQ Quiz

What are API's?
A) A software programming language
B) An internet connection protocol
C) A method of communication between two systems
D) A type of web service
What is a Web Service? API vs Web Service?
A) Web services are APIs available over the web
B) Web services are a type of software programming language
C) Web services are a communication protocol between two systems
D) Web services are used to create GUI interfaces
What type of Web Services do you know? What are the differences?
A) SOAP and XML web services
B) RESTful and JSON web services
C) HTTP and HTTPS web services
D) SOAP and RESTful web services
Which Protocol is used by RESTful Web Services?
A) TCP/IP
B) FTP
C) HTTP/HTTPS
D) SOAP
Most Commonly Used HTTP Methods supported by REST?
A) GET, POST, UPDATE, DELETE
B) READ, WRITE, DELETE
C) CREATE, READ, UPDATE, DELETE
D) GET, POST, PUT, PATCH, DELETE
Can a GET request be used instead of PUT to create a resource?
True
False
What are the differences between PUT and POST requests?
A) PUT is used for creating a new object, while POST is used to update an object
B) POST is used for creating a new object, while PUT is used to update an object
C) PUT and POST are interchangeable and can be used for both creating and updating objects
D) There are no differences between PUT and POST requests
Which HTTP Status codes do you know?
A) 1xx (Informational) 3xx (Redirection)
B) 2xx (Success->200,201,202,204)
4xx (Client Error->400,401,403,404,405)
D) 5xx (Server Error->500,501,502,503)
E) All of the above
What is API Testing?
A) Testing the functionality and performance of web applications
B) Testing the security of web services
C) Testing the functionality, reliability, performance, and security of APIs
D) Testing the user interface of web services
What are the Advantages and Disadvantages Of API Testing?
A) Advantages: Simulates real user interactions; Disadvantages: Expensive and time-consuming
B) Advantages: Language-independent; Disadvantages: Does not measure front-end performance
C) Advantages: Measures front-end performance; Disadvantages: Does not support business models
D) Advantages: Easy to automate; Disadvantages: Limited test coverage
What tools can be used to test APIs? How do you test APIs in your project?
A) Postman
B) Swagger
C) FlatDoc
D) RestDoc
What is Endpoint?
A) A location where a resource can be accessed
B) A communication channel between two systems
C) The starting point of an API request
D) A part of the HTTP protocol
What is a URI?
A) Uniform Resource Identifier
B) Universal Remote Interface
C) Unified Resource Identifier
D) User Request Interface
Do you have an API documentation website for your APIs? Any other API documentation that you know of?
A) Swagger
B) FlatDoc
C) RestDoc
D) API blueprint
What is required to send a POST, GET, PUT, PATCH, and DELETE calls?
A) URI and Headers
B) Headers and Request Body
C) Request Body and Response Status Code
D) Query Parameters and Path Parameters
What would you expect in a response?
A) Request Body, Response Body, and Response Header
B) Response Body, Response Header, and Request Header
C) Request Status Code, Request Body, and Request Header
D) Response Status Code, Response Body, and Response Header
What is JSON?
A) A programming language
B) A communication protocol
C) A format for structuring data
D) An alternative to XML
What are two types of Parameters sent with a URI?
A) Body Parameters and Query Parameters
B) Path Parameters and Query Parameters
C) Header Parameters and Body Parameters
D) Path Parameters and Header Parameters
What are Headers?
A) Request data sent with a payload
B) Part of the URI
C) Meta-information about a request
D) Response data received from a server
What is a Payload?
A) Request data sent with POST, PUT, and PATCH calls
B) Response data received from GET and DELETE calls
C) Response data received from POST, PUT, and PATCH calls
D) Request data sent with GET and DELETE calls
How do you verify a value in your Response body?
A) JUnit Assertions
B) JUnit Asserations,HamCrest Matchers
C) HamCrest Matchers, DeSerialization
D) Junit Asertions, Hamcrest Matchers, DeSerialization
What are the main challenges faced in API testing?
A) Selecting proper parameters and its combinations
B) Categorizing the parameters properly
C) Proper call sequencing
What is the JSON path?
A) A class for getting values from a JSON object
B) A format for structuring data
C) A method for validating JSON responses
D) All of the above
What would you do if you do not have URI or anything else provided for API testing?
A) Assume the values and proceed with testing
B) Request API documentation to get the required information
C) Use a default URI for testing
D) None of the above
Which data do you compare your API responses with?
A) API documentation
B) Database records
C) Both API documentation and database records
D) None of the above
How do you validate status codes in your project?
A) Using JavaScript methods
B) Using JUnit Assertions
C) Using Postman and REST Assured
D) Using then().assertThat().statusCode()
To write a feature file in Cucumber for API testing, the correct order of steps is Given - When - Then.
True
False
How do you structure testing a service with different and dynamic responses?
A) Use the correct headers, key/token, and payload/body
B) Assume the responses based on previous tests
C) Test each possible response individually
D) None of the above
What baseline metrics/requirements are necessary for preparing a performance/load test profile for a service?
A) Previous performance/load testing results
B) API documentation
C) No previous testing is necessary
D) None of the above
What performance and testing approaches would you perform on the service?
A) Follow the API documentation
B) Use global and environment variables for flexibility
C) Consult with BA and developers for further information
What does a 401 status code mean?
A) Unauthorized
B) Moved Permanently
C) Request Timeout
What is a WSDL file?
A) An XML document describing SOAP-based web services
B) An XML document describing RESTful web services
C) A configuration file for API testing
What are some principles of API test design?
A) Setting up, Execution, Verification, Reporting, Clean up
B) Setting up, Execution, Validation, Reporting, Tear down
C) Planning, Execution, Analysis, Reporting, Optimization
How did you generate tokens or keys in your API testing?
A) Manually generated them each time
B) Used the pm object in Postman
C) Created a separate class in Rest Assured
D) None of the above
What is a stateful application?
A) An application that stores credentials temporarily
B) An application that generates tokens for authentication
C) An application with server memory to store data temporarily
D) None of the above
What is a pm object in Postman?
A) A library for API testing in Postman
B) An object for performing verification and validation in Postman
C) A method for generating tokens in Postman
What does a bearer token contain?
A) Header, Payload, and Signatures
B) Authorization code, Access token, and Refresh token
C) Authentication type, Username, and Password
All of the above
REST Assured is a library for RESTful API testing in Java.
True
False
The Presentation, Application, and Data layers are layers in SOAP-based web services or RESTful web services.
True
False
What is the purpose of the Data layer in an API architecture?
A) Storing GUI elements
B) Implementing business logic
C) Storing data in a database
D) None of the above
What are Presentation, Application, and Data layers?
A) Layers in a database management system.
B) Layers in a networking model.
C) Layers in the REST architecture.
D)Layers in the REST architecture, database management systems and netwroking model
Authentication is used to check the identity and existence of a user, and Authorization checks the privileges of a logged-in user
True
False
What are path parameters and query parameters?
A) Path parameters come after the question mark (?) in key-value format, and query parameters are part of the BaseURI path
B) Path parameters are used to access specific data, and query parameters are considered as the path of BaseURI
C) Path parameters and query parameters are the same thing.
D)All of the above
What types of bugs can be found during API testing?
A) Performance, usability, and compatibility bugs.
B) Stress, security, duplicate or missing functionality, reliability, unused flags, performance, incompatible error handling, multi-threaded issues, improper errors
C) API testing cannot find bugs
D) None of the above
What is a Resource in REST?
A) Any content that can be accessed and modified by the REST server
B) Only text files and HTML pages
C) Only images, videos, or dynamic business information
D) Other types of data or content that are not specifically mentioned in the options
What is a Json Object?
A) A key-value pair in JSON format.
B) A value in JSON format that can be a JSON object, JSON element, or JSON array
C) A JSON string representing a single value
D) None of the above.
How do you use Postman in your project?
A) Set the desired URL, parameters, headers, and other required details to hit a specified endpoint and get the response body.
B) Postman is not used in projects.
C) Use Postman to generate HTML-based reports.
D) None of the above.
How did you do Automation for API on your project?
A) Use REST Assured to automate API testing, extract data from the response, and perform assertions.
B) Use Postman for automation.
C) Manual testing is the only option for API automation.
D) None of the above.
What does a global variable mean in Postman?
A) A variable accessible only within a specific collection.
B) A variable accessible across all collections and requests.
C) A variable accessible within a specific request.
What are happy scenarios about API and unhappy scenarios about API?
A) Happy scenarios involve basic positive tests, while unhappy scenarios involve negative test cases where expected errors result in passed tests.
B) Happy scenarios involve stress testing, while unhappy scenarios involve usability testing.
C) Happy scenarios involve functional testing, while unhappy scenarios involve security testing.
D) Unhappy scenarios involve unexpected server errors due to misconfigured APIs.
What is Gson?
A) A Java library for converting Java objects to JSON and vice versa.
B) A Java library for HTML parsing.
C) A Java library for API testing in Postman.
D) Gson is a programming language.
How do you debug on Postman?
A) Debugging on Postman requires advanced scripting knowledge.
B) Postman does not support debugging.
C) Use external debugging tools like Visual Studio.
D) Use request and response logs and the console to inspect variables and outcomes of script executions.
What is the purpose of using Newman in Postman?
A) Newman is a built-in tool in Postman for performance testing.
B) Newman is used to generate HTML-based reports in Postman.
C) Newman is a command-line tool for running Postman collections and environments.
D) Newman is a separate tool that is not related to Postman.
What is the purpose of environment variables in Postman?
A) Environment variables store the global configuration settings for Postman.
B) Environment variables allow for dynamic values in requests and scripts.
C) Environment variables are used to define the order of requests in a collection.
D) Environment variables are specific to the Postman Runner tool.
What is the purpose of API documentation?
A) API documentation provides a description of how an API works and how to use it.
B) API documentation is not necessary for API development.
C) API documentation is used for performance testing.
D) API documentation is used only for internal purposes.
How are you going to do debugging on Postman?
A) By using request and response logs, and the console.
B) By using external debugging tools like Visual Studio.
C) Postman does not support debugging.
D) Debugging on Postman can only be done by contacting support.
How do you make sure your response works fine?
A) By trusting that the API always returns correct responses.
B) By only checking the status code.
C) By only checking the response time.
D) By checking the status code, response time, response payload, and error messages.
To use the Rest Assured library, you add Rest-Assured as a dependency to your project and write tests using its fluent interface.
True
False
To verify response time, you use the time method in Rest Assured
True
False
You can test an API without documentation by using exploratory testing, analyzing endpoint patterns, using tools like Postman, code analysis, discussing with developers, and observing network traffic.
True
False
How can we generate HTML-based reports through Postman?
A) Generating HTML reports in Postman is not natively supported.
B) By using the built-in report generation feature in Postman.
C) By exporting the test results in HTML format.
D) None of the above.
What is an idempotent method?
A) A method that, no matter how many times it's called, the server's state will be the same after each request.
B) A method that returns the same response every time it's called.
C) A method that can only be called once.
D)All of the above
Which request methods are idempotent?
A) GET, HEAD, PUT, DELETE, OPTIONS, and TRACE.
B) GET, POST, PUT, and DELETE.
C) GET, HEAD, POST, and OPTIONS.
D) None of the above.
What is the purpose of usability testing for APIs?
A) To check the performance of the API under load
B) To validate the API's functionality and behavior
C) To assess how easy it is to use the API from a user's perspective
D) To identify security vulnerabilities in the API
Which of the following is NOT a type of security testing for APIs?
A) Authentication testing
B) Penetration testing
C) Load testing
D) Access control testing
In API testing, what does the term "negative testing" refer to?
A) Testing the API's performance under extreme conditions
B) Testing the API's compatibility with different environments
C) Testing the API's response to incorrect or unexpected input
D) Testing the API's ability to handle concurrent requests
Which of the following HTTP methods is NOT idempotent?
A) GET
B) POST
C) PUT
D) DELETE
{"name":"API IQ Quiz", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What are API's?, What is a Web Service? API vs Web Service?, What type of Web Services do you know? What are the differences?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Make your own Survey
- it's free to start.