Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
34 views
15 pages
Important Api Testing Interview Question N Answers.
Uploaded by
Vignesh Sreenivasan
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Important Api testing interview question n answer... For Later
Download
Save
Save Important Api testing interview question n answer... For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
34 views
15 pages
Important Api Testing Interview Question N Answers.
Uploaded by
Vignesh Sreenivasan
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Important Api testing interview question n answer... For Later
Carousel Previous
Carousel Next
Download
Save
Save Important Api testing interview question n answer... For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 15
Search
Fullscreen
Manas Kumar Jha Telegram: https://t. me/QAIDEAS Linkedin: https://www.linkedin.com/in/manas-jha/Linkedin Telegram Link WhatsApp Link What all challenges are included under API testing? API testing involves testing the functionality, reliabiliy, performance, and security of an API. Some specific challenges that may be encountered during API testing include: ‘© Ensuring that the API is functional and returns the correct results for different inputs. ‘© Verifying that the API is reliable and returns consistent results over time. ‘© Testing the performance of the API to ensure that it can handle a high volume of requests and has a fast response time = Eneuring that the API ie secure and cannat he sccassed hy unauthorized users ‘© Testing the APIs error handling capabilities to ensure that it returns appropriate error messages and codes when something goes wrong. ‘© Testing the API's compatibility with different platforms, devices, and operating systems. © Verifying that the API can be easily integrated into other applications. ‘+ Chauring that the API documentation is accurate and up-to-date. What is the difference between API and WebService? API (Application Programming Interface) is a set of routines, protocols, and tools for building software applications. It provides a way for developers to access and interact with application data and functions. ‘A WebService is an application that is accessible over e network, such as the Internet, and provides a set of functions and data that can be accessed by other ap} applications, or components of the same application, over anetwork. What is the difference between SOAP & Rest API. ications. Itis a means of communication between two ‘SOAP (Simple Object Access Protocol) Is @ protocol that uses XML as its message format to exchange information between computers over the internet. SOAP is a more complex and rigid protocol, with more complex security features and requires more bandwidth for communication. REST (Representational State Transfer) is an architectural style that defines a set of constraints and properties based on HTTP. itis a more lightweight and flexible architecture that uses HTTP and JSON as its massage format, REST is simpler ta ure and has hetter perfarmanre, cinre it uses fower rosaurcas than SOAP. Itis also more secure since It has more bullt-in security features. Can you write a sample of API(URL) and JSON. Manas Jha 9145735668LinkedIn Telegram link WhatsApp Link eee ea ‘Authentication tokens are typically used to store a uses identity and other information securely during a session. To handle authentication tokens, a server should first generate a token and store it in a secure location. This token should then be sent to the client with each request that requires authentication. The client should then send the token back with each request, allowing the server to verify the user's identity and process the request accordingly. Additionally, the server should regularly check that the token is still valid, and if not, generate a new one and send it back to the client oAuth1.0 - Uses HMAC-SHA1 signature method - Requires user to authorize access via signing @ request - Uses plain text tokens Uses 2-legged authorization muth2.0 Uses digital signature or public/private key encryption Requires user to authorize access via authenticating with an access token Manas Jha 9145735668Linkedin Telegram Link WhatsApp Link Uses JSON Web Tokens (JWT) - Uses 3-legged authorization RaseLiRI in RestAssured is the hase URL of the web service that is being tested. itis used to set the endpoint of the web service that will be tested, BaseURIis set using the RestAssured.baseURI() method. RequestSpecification request = RestAssured.givent); isan expression used to create a request that can be Used in RestAssured to send a request to a specific endpoint. It is used to set up the request and define the parameters of the request such as the headers, cookies, body, and query parameters. It can also be used to set up the authentication for the request. To handle different HTTP status codes when testing an API with REST Assured, you can use the statusCode ‘method in the Response object. This method returns the HTTP status cade of the HTTP response. You can then use an if statement or a switch statement to execute different blocks of code depending on the status code. For example, you could use the following code to hancle a 200 OK status code: ssponse response = given() Re en a Le eae) her enc If statusCode == 200) { ener You can also use the assertThat method to verify that the status code of the response is what you expect it to be. For example: sponse response = given() Dec CMTS re Eee a a Manas Jha 9145735668LinkedIn Telegram link WhatsApp Link at(response.statusCodel), equalTo(200)); This will cause the test to fal ifthe status code of the response is not 200 Ok. You can use similar techniques to handle other status codes as well. For example, to handle 2 404 NOT FOUND status code, you could use the following code: ee ea ns int statusCode = response statusCode(); oetner lees ena To print the response of an API in JSON format using REST Assured, you can use the prettyPrint method of the Response object. This method returns the body of the response as a formatted JSON string. Here is an example of how you can use the prettyPrint method to print the response of an API in JSON format: ocean) hheader("Content-Type", " Pert SU ean a m.out.printin(response.prettyPrint() This will print the body of the response in a formatted ISON string. You can also use the asString method to print the body of the response as a raw string, rather than a formatted JSON string. For example: Manas Jha 9145735668LinkedIn Telegram link WhatsApp Link TT eee This will print the raw string representation of the body of the response. To use REST Assured, you will need to add the following dependencies to your project: JUnit: This is a Java testing framework that is commonly used to write and run test cases for REST Assured. Rest-assured: This isthe core library for REST Assured. It provides the classes and methods for making HTTP requests and validating the responses, Hamecrest: This is a library of matcher objects that can be used to create assertions in your test cases. ‘Apache HTTP Client: This is @ Java library for making HTTP requests. Its used by REST Assured to send HTTP requests and receive HTTP responses. To add these dependencies to your project, you will need to include them in your build too!’s configuration file, For example, if you are using Maven, you can add the following dependencies to your pom.xml file: dependencies> To eee Cee Cee ees aes See ees eo nere ra Ree a Pee Se ers a Manas Jha 9145735668Linkedin Telegram Link WhatsApp Link Sree ees
hamerest-ibrary
You might also like
Salesforce Integration Bootcamp Notes
PDF
No ratings yet
Salesforce Integration Bootcamp Notes
22 pages
Api Interview Questions
PDF
100% (1)
Api Interview Questions
7 pages
100 Postman API Testing Interview QnA
PDF
No ratings yet
100 Postman API Testing Interview QnA
33 pages
REST API Presentation
PDF
No ratings yet
REST API Presentation
35 pages
REST ASSURED
PDF
No ratings yet
REST ASSURED
7 pages
API Testing_Questions
PDF
No ratings yet
API Testing_Questions
4 pages
Rest_Assured_Interview_Questions_Q_A_1734797664
PDF
No ratings yet
Rest_Assured_Interview_Questions_Q_A_1734797664
22 pages
Rest Assured
PDF
No ratings yet
Rest Assured
47 pages
7_API testing Interview Questions and Answers
PDF
No ratings yet
7_API testing Interview Questions and Answers
14 pages
Basic API Testing Questions
PDF
No ratings yet
Basic API Testing Questions
5 pages
API Testing Practical Guide - QA_SDET
PDF
No ratings yet
API Testing Practical Guide - QA_SDET
7 pages
Rest Assured Interview Questions
PDF
No ratings yet
Rest Assured Interview Questions
8 pages
Rest Assured Interview QuestionSet1 PDF
PDF
No ratings yet
Rest Assured Interview QuestionSet1 PDF
5 pages
Api testing interview Questions.docx2
PDF
No ratings yet
Api testing interview Questions.docx2
6 pages
API & Postman_QA_Final
PDF
No ratings yet
API & Postman_QA_Final
6 pages
APIs Study 1
PDF
No ratings yet
APIs Study 1
15 pages
API Testing Slides
PDF
No ratings yet
API Testing Slides
93 pages
API Questions - Interview
PDF
No ratings yet
API Questions - Interview
4 pages
API Postman
PDF
No ratings yet
API Postman
17 pages
Rest API Testing Interview Questions
PDF
No ratings yet
Rest API Testing Interview Questions
2 pages
API Questions and Answers
PDF
No ratings yet
API Questions and Answers
9 pages
RESTAPI
PDF
No ratings yet
RESTAPI
274 pages
API Testing Interview Questions
PDF
No ratings yet
API Testing Interview Questions
11 pages
API QUESTIONS
PDF
No ratings yet
API QUESTIONS
5 pages
API
PDF
No ratings yet
API
16 pages
Restful Api
PDF
No ratings yet
Restful Api
27 pages
Web API & Interviewer Question
PDF
No ratings yet
Web API & Interviewer Question
7 pages
API Postman
PDF
No ratings yet
API Postman
17 pages
REST API (2)
PDF
No ratings yet
REST API (2)
5 pages
Rest Api
PDF
No ratings yet
Rest Api
5 pages
Notes -2
PDF
No ratings yet
Notes -2
12 pages
1-What Is An API?: //asked in Interview
PDF
No ratings yet
1-What Is An API?: //asked in Interview
10 pages
API Testing
PDF
No ratings yet
API Testing
8 pages
REST API (1)
PDF
No ratings yet
REST API (1)
5 pages
Web II Handling Requests and Responses Lesson005
PDF
No ratings yet
Web II Handling Requests and Responses Lesson005
16 pages
Api Testing Quick Reference
PDF
No ratings yet
Api Testing Quick Reference
15 pages
RestAPI Testing
PDF
No ratings yet
RestAPI Testing
11 pages
Vrushali
PDF
No ratings yet
Vrushali
33 pages
Postman-2
PDF
No ratings yet
Postman-2
23 pages
Api Presentation
PDF
No ratings yet
Api Presentation
30 pages
API Testing Interview Question!!!!!!!!!
PDF
No ratings yet
API Testing Interview Question!!!!!!!!!
6 pages
API Testing Guide 1730023081
PDF
No ratings yet
API Testing Guide 1730023081
18 pages
API Interview Questions
PDF
No ratings yet
API Interview Questions
7 pages
RestAssured Notes
PDF
No ratings yet
RestAssured Notes
2 pages
API Content
PDF
No ratings yet
API Content
7 pages
REST QUESTIONS
PDF
No ratings yet
REST QUESTIONS
3 pages
API End - EndNotes V1.0
PDF
No ratings yet
API End - EndNotes V1.0
27 pages
Practical guide to API testing
PDF
No ratings yet
Practical guide to API testing
7 pages
API Testing Handbook
PDF
No ratings yet
API Testing Handbook
16 pages
REST Basics
PDF
No ratings yet
REST Basics
18 pages
Rest Assured Deck
PDF
No ratings yet
Rest Assured Deck
56 pages
API Testing Cheat Sheet With Postman
PDF
No ratings yet
API Testing Cheat Sheet With Postman
4 pages
Testing Manual 1620883272
PDF
100% (1)
Testing Manual 1620883272
146 pages
Postman
PDF
No ratings yet
Postman
15 pages
API Testing Postman
PDF
No ratings yet
API Testing Postman
102 pages
API Testing Questions and Answers
PDF
No ratings yet
API Testing Questions and Answers
5 pages
Automation API TM14 PDF
PDF
No ratings yet
Automation API TM14 PDF
72 pages
Postman API
PDF
No ratings yet
Postman API
30 pages
API Testing Interview
PDF
No ratings yet
API Testing Interview
7 pages
Vignesh W
PDF
No ratings yet
Vignesh W
4 pages
Vignesh S
PDF
No ratings yet
Vignesh S
2 pages
Elusive Nonviolence The Making and Unmaking of S Annas Archive
PDF
No ratings yet
Elusive Nonviolence The Making and Unmaking of S Annas Archive
242 pages
Python Complete Handwritten Notes
PDF
No ratings yet
Python Complete Handwritten Notes
77 pages
Cassandra
PDF
No ratings yet
Cassandra
31 pages
Kafka Handwritte Notes 1
PDF
No ratings yet
Kafka Handwritte Notes 1
9 pages
Docker Handwritten Notes by Mohd Imran
PDF
No ratings yet
Docker Handwritten Notes by Mohd Imran
13 pages