0% found this document useful (0 votes)
8 views2 pages

Advance API Testing Interview QnA Part 2 - 5 QnA

Uploaded by

vamshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Advance API Testing Interview QnA Part 2 - 5 QnA

Uploaded by

vamshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

You Don't have to iterate over all the records

You can verify the Data Types of key and Value by JSON Schema Validation

You can verify the same using pattern, JSON Path extra
Question 1 - How will you validate 10,000 Records
where Data Type mismtach happens in Response? They are checking How you handle large chunk data.

You can verify missing keys if any also

https://www.jsonschema.net/
Read more
https://www.youtube.com/c/TheTestingAcademy/search?query=json%
20schema

They want to see Create, Update, Delete and Get a Booking as verfication https://restful-booker.herokuapp.com/apidoc/index.html

Question 2 - Write a Collection in POSTMAN to


Test the Restful Booker App an Integration
Scenarios?

POST, PATCH, DELETE, GET

Auth Types they will Discuss

Integration Scenarios are Flow of APIs

POSTMAN Collection https://www.getpostman.com/collections/641eba3159af83667d4e

Given a URl of SOAP https://www.w3schools.com/xml/tempconvert.asmx

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.
w3.org/2003/05/soap-envelope">
<soap12:Body>
Given payload, verify conversion <FahrenheitToCelsius xmlns="https://www.w3schools.com/xml/">
<Fahrenheit>75</Fahrenheit>
Question 3 - Make a SOAP Request to URL given
</FahrenheitToCelsius>
and fetch the VERIFY THE expected? </soap12:Body>
</soap12:Envelope>

Convert to JSON for easy in POSTMAN

SOAP Message decoding Explain

XML, POST and What is SOAP?

{
"firstname": "John",
"lastname": "Terry",
"totalprice": 5000,
"depositpaid": false,
Response is shared "bookingdates": {
"checkin": "2020-01-01",
"checkout": "2020-12-31"
},
"additionalneeds": "Lunch"
}

package com.example;

import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"key"
})
@Generated("jsonschema2pojo")
public class Example {
Advance API Testing Interview QnA Part 2 - 5 QnA
@JsonProperty("key")
private String key;

@JsonProperty("key")
public String getKey() {
return key;
}

Question 4 : Create a Pojo Class for the @JsonProperty("key")


Create POJO for it (jackson)
public void setKey(String key) {
Response (with Nested Class?) this.key = key;
}

"key" : "value"
}

POJO stands for Plain Old Java Object

POJOs basically define an entity

POJO is an object which encapsulates Business Logic

Explain Pojo and why it is used Serializable , DeSerializable Subtopic 1

It is used when you don’t want to give restriction on your members and give
user complete access of your entity

This increases the chance that this can be reused in multiple project types (
web, desktop, console etc).

https://www.jsonschema2pojo.org/ 

IntellJ Plugin Pojo Geneartor

Building API Automation Framework in Rest Assured src, pom,

Question 5 : Explain Structure of API Automation


Framework?

Screenshot 2022-07-27 at 12.23.39 PM.png

Full Framework

Subtopic 2

API Automation - https://github.com/apitestingco/RestAssured-Workshop/


tree/master/src/test/java/actions

https://www.getpostman.com/collections/759cc00b76c41cdc9435

Advance POSTMAN Collection for Live Projects

LIVE Projects

You might also like