Chapter 1: Introduction to API Testing
Chapter Goal: Help the reader identify the purpose of the book, target audience and skills set required to perform API Testing
No of pages -
Sub -Topics
1. What is API Testing
2. Why We Need API Testing
3. Types of API Testing
4. Advantages
Chapter 2: Software Application
Chapter Goal: Gain knowledge about software web application standards which involves APIs
No of pages: -
Sub - Topics
1. REST Client/Server Architecture
2. Monolithic Vs. Microservices based web application
3. HTTP(s)
4. Header(s)
5. Request / Response
6. Response Codes
Chapter 3: Authentication
Chapter Goal: Standard authentication used in industry
No of pages : -
Sub - Topics:
1. Basic Authentication
2. Session Based Authentication
3. Token / JWT Based Authentication
4. OAuth2 Based Authentication
Chapter 4: Tools
Chapter Goal: Understanding of Tools used for doing API Testing
No of pages: -
Sub - Topics:
1. Postman
2. CURL
3. RestAssured
4. TestNG
5. Log4j
6. Java - Spring Boot
Chapter 5: Test Pyramid
Chapter Goal: Testing types and hierarchy of each type
No of pages: -
Sub - Topics:
1. Black Box Testing
2. Grey Box Testing
3. Unit Testing
4. Components of Test Pyramid
Chapter 6: Testing The API
* Chapter Goal: API Testing Paradigm (Internal/External APIs., CDCT)
No of pages: -
Sub - Topics:
1. Manual Test Script/ Workflows/ Use Cases
2. What to Test
a. Schema
b. Data
c. Data Type
3. Coverage Good / Bad
4. Headers Testing
a. Request Header
i. Correct Header
ii. Missing Header
iii. Incorrect Header
iv. Unsupported Type
b. Response Header
i. Supported Type
ii. Header Response
iii. Response Codes
5. Request Body
a. Format Unsupported
b. Special Characters
c. Too long String
d. Invalid value
e. Wrong data type
f. Empty data/object
g. Required fields
h. Null
i. Redundant fields
j. DELETE already deleted entity
k. Use PUT in place of POST etc.
6. Response Body
a. Actual Data vs. Expected Data
b. Limit
7. Internal vs. External APIs
8. CDCT - Consumer Driver Contract Testing
9. Risk
a. Importance of Negative Testing
Chapter 7: A Good Test Script
Chapter Goal: Properties of a Good test script
No of pages: -
Sub - Topics:
1. Components of a Good Test Script
2. Example
Chapter 8: Coding Guidelines
Chapter Goal: Using standard coding guidelines for better test management and review.
No of pages: -
Sub - Topics:
1. Google Best Practices
2. Test Naming Conventions
3. Method Naming Convention
4. Others
Chapter 9: Organize Test Framework
Chapter Goal: Organize a test framework in a way that is usable across any team / project
No of pages: -
Sub - Topics:
1. Maven Project
2. Dependencies
3. Spring Boot
4. Properties File/Environment Based
5. End Points
6. Authentication
7. Request
8. Response
9. Test Data
a. JSON
b. File
c. HashMap
d. TestNG data provider
10. Logging
Chapter 10: First Test
Chapter Goal: Write first test to get a feel of API testing
No of pages: -
Sub - Topics:
1. Developing First Test
2. Executing First Test
3. Check Results
4. Check Logging
Chapter 11: API Documentation
Chapter Goal: API documentation is a mandatory requirement for writing API tests, swagger is the tool that is being used, we will see how to read the swagger API documentation for better understanding on the End Points.
No of pages: -
Sub - Topics:
1. Swagger
2. Why We Need API Documentation
3. Understanding the API Documentation
Chapter 12: Case Study - Shopping Cart APIs
Chapter Goal: A Sample application is used to demonstrate the industrial way of doing API testing, this is an equivalent to a workshop on doing API testing.
No of pages: -
Sub - Topics:
1. Setting Up Application
2. Goal Setting
3. Test Environment (Docker Container)
4. Test Data Preparation
5. Agile Testing
6. Shopping Cart API End Points
7. Understanding Business Requirements
8. Manual Tests Scripts
9. Implementing Test Framework
10. Writing Test
11. Test Suite
12. Execution
13. Results
14. Utilities