Testing
Event Sequences SEQUENCE COVERING ARRAY LIBRARY Note: a technical paper providing more depth than this introduction is available here. Many testing problems involve sequences of operations. For example, an embedded system may accept multiple sensor inputs and generate output to several communication links and effectors such as machine controls. It is important to test combinations of connected components, but also to test the order in which they could be connected. There is an empirical basis for the use of sequence covering arrays. In reviews of various failure reports, when sequences of events were involved, the critical condition for triggering failures generally was whether or not a particular event had occurred prior to a second one, not necessarily if they were back to back. In other words, the report might say something like 'failure occurred when <event A> if B is already connected'. So it appeared that A didn't have to immediately follow B, but the fact that it followed B at some point after B had already occurred was sufficient to trigger a failure. Sequence covering arrays, as we have defined them, ensure that any t events will be tested in every possible order. For example, we may have a factory automation system that uses certain devices interacting with a control program. For this problem we can define a sequence covering array, which is a set of tests that ensure all tsequences of events have been tested. The t events in the sequence may be interleaved with others, but all tway permutations will be tested. We want to test the following events:
(Keep in mind that this example is small for convenience. A real system may have, for example, 10 devices to connect, in which case the number of permutations is 10!, or 3,628,800 tests for exhaustive testing. In that case, a 3sequence covering array with 14 tests would be a much more dramatic improvement.) Definition. We define a sequence covering array, SCA(N, S, t) as an N x S matrix where entries are from a finite set S of s symbols, such that every tlength permutation of symbols from S occurs in at least one row; the t symbols in the permutation are not required to be adjacent.
Example 2. Generating a 2sequence covering array is trivial: list the events in some order for one test and in the reverse order for the second test.
As shown in example 2, only two tests are needed to cover all 2way permutations of symbols. Other values of t > 2 will require more. The example below covers all 3way permutations for five events in eight tests. Arrays for other event set sizes can be found in the library table following.
SEQUENCE COVERING ARRAY LIBRARY The sequence covering
arrays are provided in comma
separated value form. Currently arrays are for 3way interactions
only. Longer permutations will be added in the future.
For
2way
permutations, event sequences can simply be reversed, as shown in
Example 2, so these arrays are not included in the library.
Please note that these arrays were prepared with a quick and
dirty greedy algorithm in Oct 09, and can probably be improved upon.
We are working on this now. If you have an
algorithm that generates smaller arrays, we would be happy to host
them, citing your algorithm of course; feel free to email me at
kuhn@nist.gov if interested.
