0
0
Testing Fundamentalstesting~5 mins

Stored procedure testing in Testing Fundamentals - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a stored procedure in a database?
A stored procedure is a set of SQL statements saved in the database that can be executed as a single unit. It helps automate repetitive tasks and improves performance.
Click to reveal answer
beginner
Why do we test stored procedures?
We test stored procedures to ensure they work correctly, return expected results, handle errors properly, and do not cause data issues.
Click to reveal answer
beginner
Name one common type of test performed on stored procedures.
Functional testing: checking if the stored procedure returns the correct data for given inputs.
Click to reveal answer
beginner
What is a test case for stored procedure testing?
A test case is a set of inputs, execution steps, and expected results used to verify that the stored procedure behaves as intended.
Click to reveal answer
intermediate
How can you check if a stored procedure handles errors correctly?
By providing invalid or unexpected inputs during testing and verifying that the procedure returns error messages or handles the situation gracefully without crashing.
Click to reveal answer
What is the main purpose of testing a stored procedure?
ATo verify it returns correct results
BTo change its code
CTo delete data
DTo create new tables
Which of the following is NOT a typical test for stored procedures?
AFunctional testing
BPerformance testing
CSyntax highlighting
DError handling testing
What should you do if a stored procedure returns unexpected results during testing?
AIgnore it
BRun it again without changes
CDelete the procedure
DReport and fix the issue
Which input type is useful to test error handling in stored procedures?
AInvalid or unexpected inputs
BValid inputs
CEmpty inputs only
DNo inputs
What is a test case in stored procedure testing?
AA saved procedure
BA set of inputs and expected results
CA database backup
DA SQL command
Explain why testing stored procedures is important and what key aspects should be tested.
Think about what can go wrong if stored procedures are not tested.
You got /4 concepts.
    Describe how you would create a test case for a stored procedure that calculates discounts.
    Consider inputs like customer type or purchase amount.
    You got /4 concepts.