How to Test Database Procedures and Triggers?

Questions by muthuppandi   answers by muthuppandi

Showing Answers 1 - 15 of 15 Answers

Aruna Kumar G

  • Aug 17th, 2006
 

Before testing Data Base Procedures and Triggers, Tester should know that what is the Input and out put of the procedures/Triggers, Then execute Procedures and Triggers, if u get answer that Test Case will be pass other wise fail.

These requirements should get from DEVELOPER

  Was this answer useful?  Yes

sandy8035

  • Oct 4th, 2006
 

Create queries with the data which triggers/procedures should not allow, if the transactions pass, triggers not fired if transaction fails triggers fired.

Sunny

  Was this answer useful?  Yes

naraindran

  • Oct 10th, 2006
 

can you explain the trigger concept with an example please

KS

  • Dec 21st, 2006
 

The concept is simple.Let us take the example of a trigger, say, an update trigger for the employee table.Now, the logic here is, let's say when a row is modified(for eg, Emp name is being changed), that information needs to be emailed to a person.We can use triggers to do this. By setting a trigger on an action, we indirectly ensure that, whenever that action takes place, the corresponding trigger will fire and the commands in the trigger will get executed.

  Was this answer useful?  Yes

SS

  • Jun 25th, 2015
 

So, in above scenario if I want to test the negative scenario then how can I fail this trigger without changing the code?

  Was this answer useful?  Yes

If you put entry in employee table, an entry is created in department table with some values.

Now make a transaction such that employee table gets an entry. To verify correctly you can see the body of trigger in ALL_TRIGGER TABLE with the trigger name and check what values its populating in department table and then you can confirm comparison if department table got what its supposed to get.

For procedures, you should know on what transaction it will be called, and for knowing if its working fine, you may need to see its body which can be in some document prepared by Development

  Was this answer useful?  Yes

Swathi

  • Sep 24th, 2015
 

Make a transaction to create entry employee table, where the same row already exists in department table.
Here we will get violation error.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions