Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
11.4.1. Common Assertions
This section
Practice test
10 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
2 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is an assertion in the context of API testing?
Hint
Think about what we check when our API returns a response.
- 2.
What does a status code of 404 mean?
Hint
Recall common HTTP status codes you have learned.
- 3.
What is the purpose of an assertion in Postman?
- To verify that requests are sent correctly
- To validate responses received from APIs
- To document API functionality
Hint
Think about how we can confirm our API works.
- 4.
True or False: A status code of 200 indicates that the request was successful.
- True
- False
Hint
Recall HTTP status codes.
- 5.
Write a set of assertions that validate if the API response contains a user ID, name, and whether the status is 200.
Hint
Remember to check both the status and the fields.
- 6.
Describe how to address a scenario where an assertion fails during testing.
Hint
Think about the process of troubleshooting.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
Get your answers marked and your progress tracked
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting