Information Technology Reference
In-Depth Information
Chapter 3
One Test at a Time
Abstract This chapter presents the one-test-at-a-time algorithms for finding
covering arrays. These algorithms generate the test suite in a greedy manner: test
cases are generated one by one, until the coverage requirement is met, while each
newly-generated test case covers as many uncovered target combinations as possible.
Compared to other approaches, the one-test-at-a-time algorithms are more flexible
to deal with various kinds of special test requirements, whoever the strategy brings
some limitations on finding smaller test suites.
3.1 General Idea of the One-Test Strategy
The main idea of the strategy is straightforward: generate the test cases one by
one (i.e., generate the covering array row by row) until the coverage requirement
is met. During the process, each new test case covers as many uncovered target
combinations as possible, so that the total number of test cases in the test suite
can be minimized. The general framework of the one-test-at-a-time strategy can be
abstracted as Algorithm 1.
Algorithm 1 The one-test-at-a-time Strategy
1: test _ suite =∅
2: init( uncov _ target _ combs );
3: while uncov _ target _ combs =∅ do
4:
new _ test _ case = gen_new_test_case ()
5:
test _ suite = test _ suite ∪{ new _ test _ case }
( uncov _ target _ combs , new _ test _ case )
7: end while
6:
update
At the beginning, the algorithmneeds to initialize the set of all target combinations.
In each iteration of the while-loop, it generates a test case that covers as many target
combinations as possible. After a new test case is generated, the target combinations
covered by the new test case are removed from the set. The while-loop terminates
 
 
Search WWH ::




Custom Search