0% found this document useful (0 votes)
32 views1 page

Senior SDET Java Postman RestAPI Interview Prep

The document is a comprehensive guide for preparing for a Senior SDET interview focused on Java, Postman, and REST API testing. It covers API testing fundamentals, Rest Assured usage, Java coding questions, framework design, advanced API scenarios, and final interview Q&A. Key topics include REST vs SOAP, HTTP methods, Postman assertions, authentication, pagination, and debugging flaky tests.

Uploaded by

alekhyaa309
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)
32 views1 page

Senior SDET Java Postman RestAPI Interview Prep

The document is a comprehensive guide for preparing for a Senior SDET interview focused on Java, Postman, and REST API testing. It covers API testing fundamentals, Rest Assured usage, Java coding questions, framework design, advanced API scenarios, and final interview Q&A. Key topics include REST vs SOAP, HTTP methods, Postman assertions, authentication, pagination, and debugging flaky tests.

Uploaded by

alekhyaa309
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/ 1

■ Senior SDET Interview Prep (Disney+ / ESPN)

Java + Postman + Rest API Focus — Detailed Q&A; Guide

Section 1: API Testing Fundamentals (Postman + Rest Assured)


- **REST vs SOAP:** REST is stateless and uses lightweight formats (JSON), whereas SOAP uses XML and
is heavier. - **HTTP Methods:** GET (retrieve), POST (create), PUT (update), DELETE (remove). - **Postman
Assertions:** Use Chai syntax, e.g. `pm.test("Status is 200", () => pm.response.to.have.status(200));` -
**Chaining Requests:** Use environment variables and pre-request scripts to reuse data between calls. -
**Common Headers:** `Authorization`, `Content-Type`, `Cache-Control`.
Section 2: Rest Assured Deep Dive
Rest Assured simplifies REST API testing in Java. Setup Example: ``` import static
io.restassured.RestAssured.*; import static org.hamcrest.Matchers.*; given()
.baseUri("https://api.example.com") .when() .get("/users/1") .then() .statusCode(200) .body("data.name",
equalTo("John Doe")); ``` - **JSON Path Extraction:** `response.jsonPath().getString("data.email")` -
**Authentication:** `auth().preemptive().basic("user","pass")` - **Schema Validation:**
`.body(matchesJsonSchemaInClasspath("schema.json"))`
Section 3: Java Coding Questions for SDET
**Q1. Merge Two Sorted Arrays Without Extra Space** ``` int[] merge(int[] a, int[] b) { int i = a.length - 1, j =
b.length - 1, k = a.length + b.length - 1; int[] result = new int[k + 1]; while (j >= 0) result[k--] = (i >= 0 && a[i] >
b[j]) ? a[i--] : b[j--]; return result; } ``` **Concepts to Know:** - HashMap vs ConcurrentHashMap differences
(thread safety, locks) - Java Streams for filtering and transforming collections
Section 4: Framework Design & Advanced Q&A;
**Q: How do you design a reusable Rest Assured framework?** - Create a BaseTest class with common setup
(base URI, authentication). - Use RequestSpecification and ResponseSpecification for reuse. - Integrate with
TestNG for test organization. - Generate HTML/Allure reports for visualization. - Manage configurations with
property files or environment variables.
Section 5: Advanced API Scenarios
- **Pagination:** Validate `page`, `limit`, and response array size. - **Rate Limiting:** Send multiple requests,
assert `429 Too Many Requests` behavior. - **Negative Tests:** Send malformed payloads, missing tokens. -
**Performance:** Measure `.time(lessThan(2000L))` for API latency.
Section 6: Final Interview Q&A;
1. How would you debug flaky API tests in CI? → Use logging, retry mechanisms, analyze network delays,
isolate flaky endpoints. 2. How to test a live sports API updating every second? → Verify data freshness, time
drift, and caching behavior. 3. How to design tests for authentication flows? → Token refresh validation,
expired token handling, role-based access. 4. How do you ensure consistency across microservices? → Use
contract tests, message queues, and distributed tracing.

You might also like