0
0
Testing Fundamentalstesting~5 mins

Request and response validation in Testing Fundamentals - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is request validation in software testing?
Request validation is the process of checking if the data sent to a system (like a web server) is correct, complete, and safe before the system processes it.
Click to reveal answer
beginner
Why is response validation important in testing?
Response validation ensures that the system returns the correct and expected data after processing a request, helping to catch errors or unexpected behavior.
Click to reveal answer
beginner
Name two common checks done during request validation.
1. Checking if required fields are present.<br>2. Verifying data types and formats (e.g., email format).
Click to reveal answer
intermediate
What can happen if response validation is skipped?
Skipping response validation can let bugs or incorrect data go unnoticed, which may cause problems for users or other systems relying on that data.
Click to reveal answer
beginner
Give an example of a simple assertion for response validation in testing.
An example: Check if the response status code is 200 (OK) to confirm the request succeeded.
Click to reveal answer
What does request validation primarily check?
AIf the system returns the correct data
BIf the data sent to the system is correct and safe
CIf the user interface looks good
DIf the server is online
Which of the following is a common response validation step?
AChecking if the request has all required fields
BChecking the user's password strength
CChecking if the response contains expected data
DChecking the server's CPU usage
What might happen if request validation is missing?
AInvalid or harmful data may be processed by the system
BThe system will run faster
CThe user interface will change color
DThe server will shut down
Which status code is commonly checked in response validation to confirm success?
A302
B500
C404
D200
What is a simple way to validate a JSON response?
ACheck if the JSON contains expected keys and values
BCheck if the JSON is encrypted
CCheck if the JSON is very large
DCheck if the JSON is sent by email
Explain in your own words why request and response validation are important in software testing.
Think about what happens if bad data enters or bad data leaves a system.
You got /4 concepts.
    Describe two common checks you would perform when validating a request and two for validating a response.
    Consider what you check before sending data and what you check after receiving data.
    You got /2 concepts.