Testing - designing unit tests

notes from the internet

test specifications

aim for specification coverage, not code coverage

test across boundaries

write tests that reveal a bug, then fix it

ref

what needs to be tested with higher priority?

what should be tested

what should not be tested?

predicate testing

which action should be taken under what condition? each action must be tested

predicates === if else statements

they can be identified form both formal and informal requirements as well as behavioral models such as FSM

they are one of these:

  1. identify predicates in the function you are testing
  2. write for each scenario

more pointers

ref