W3C home > Mailing lists > Public > www-qa@w3.org > January 2005

QASG last call comments: "Write sample code or tests" comments

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 19 Jan 2005 14:55:38 +0000 (UTC)
To: www-qa@w3.org
Message-ID: <Pine.LNX.4.61.0501191455260.7711@dhalsim.dreamhost.com>

"5 Good Practice C: Write sample code or tests" -- another technique
is to go back and create new tests for old sections once the sections
are better understood and more mature. It also helps to write tests
that check the interactions of different sections.

Also, especially when using test assertions, the temptation is to have
one (or more) tests per assertion. However, one must absolutely check
the _interactions_ of assertions, as that is where most bugs are
likely to be found. For example, the two assertions "when X happens, A
must happen" and "when Y happens, B must happen" can be tested
individually, but they must also be checked together, to ensure that
if X and Y both happen, first A happens then B happens, etc.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 19 January 2005 14:55:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:40:36 UTC