Thursday, December 15, 2011

How do you build a test case for the following requirement:?

All records shall store the System date and time “DDMMYYYY:HHMM” at the time of writing to the ledger table “LEDGER_TABLE” if the transaction date is less than the System date and the transaction record meets the format “TXN_DDMMYYYY”|||A test case to check the above requirement could be as follows:





1. Check the format of the transaction record. If it is “TXN_DDMMYYYY”, then perform step 2, else stop.





2. Check if the Transaction Date is less than the System Date. If so, perform step 3, else stop.





3. Check if the record has been written to the LEDGER_TABLE.


EXPECTED RESULT: The record should store the System Date and time in the format “DDMMYYYY:HHMM”.





The Steps and Expected Results would be in separate columns in the test case table.


|||1. Write transactions matching that format, then read the system date and transaction record back and make sure they're correct.





2. Set the transaction date after the system date, and make sure the write fails.





3. Try to store an invalid transaction date, and make sure the write fails.





4. Try a weird system date far in the future, and make sure the write succeeds.





There are other ideas you could try.

No comments:

Post a Comment