InterviewSolution
| 1. |
How do you test the database triggers and procedures? |
|
Answer» For testing the database triggers and procedures, it is required to KNOW the input parameters to these functionalities and know what would be the expected output for these. The EXEC statement can be used for determining the behaviour of the TABLES when the procedures or triggers are run. You can also achieve this by creating SQL unit tests for checking the database objects modified due to the EXECUTION of the triggers or procedures. The SQL unit tests follow the 3 rules as shown below: The test case should check whether the objects exist in the database or not. It should check or validate what the normal outputs would be for success scenarios. It should also check for the behaviour of the system under the influence of NEGATIVE test cases. |
|