Re: QA Glossary

At 02:02 PM 5/24/02 -0400, David Marston/Cambridge/IBM wrote:

>Jack Morrison writes:
> >What is the order of things? I thought the current definition implied
> >Atomic Test, Test Case, Test Purpose, Test Assertion(s).
>
>Specs (should) contain test assertions. In order to get good ones, the
>spec writers should think about test cases. [...].
>
>Jack cites this as a test assertion:
>"Non-positive radius is an error condition."
>If that is a good example, then you won't have very many atomic tests!
>Right away, I see two classes of test cases:
>A. Any routine that produces a radius must ensure that it is numeric
>    and positive.
>B. Any routine that consumes a radius parameter as input must signal
>    an error if it is given a non-positive value.
>A more complete assertion of type B might be, for example:
>"DrawCircle() must raise an error if it is given a radius value that
>is numeric but non-positive."
>That looks like a reasonable test assertion because one can readily
>devise a test to call DrawCircle() with a negative number as its
>radius argument. Presumably, all the front matter of the test that
>sets up conditions under which DrawCircle can be called would not
>detract from the atomic nature of the test.

David has given a really good example that illustrates the need to develop 
these terms carefully and fully.  While given as a "bad" example, I think 
it is common to some types of standards.

S:  "Non-positive radius is an error condition.",

is typical statement from a standard.  It qualifies as a test assertion 
about content.  It says nothing about content generators or content 
consumers.  It is sometimes the case that related statements in the 
standard about generators and consumers are general.  This is not uncommon 
in standards that I have worked with:

A1.  "Conforming generators shall not produce erroneous content."
B1.  "Conforming consumers shall raise an error condition about erroneous 
content"

The test assertions A and B listed by David are good ones for atomic tests, 
but they do not correspond directly to single statements in the 
standard.  Rather, they are synthesized from multiple statements.  "A" is 
synthesized from "S" and "A1" (statements in the standard), and "B" 
is  synthesized from "S" and "B1".

-Lofton.

Received on Wednesday, 29 May 2002 11:46:07 UTC