Research Article

Empirical Study of the Effects of Different Similarity Measures on Test Case Prioritization

Algorithm 2

Global similarity-based prioritization algorithm.
Input: A test suite : with test cases
Output: A prioritized sequence : of test suite
(1)calculate the distance between pair-wise test cases in ;
(2);
(3)  ;
(4)for   to   do
(5)  ;
(6)end
(7)select test case that has the maximum average distance from ;
(8);
(9);
(10) ;
(11)  for   to   do
(12) ;
(13) end
(14) repeat
(15) ;
(16) for   to   do
(17)   if    and    then
(18)   ;
(19)   ;
(20)   end
(21) end
(22)  add to the tail of ;
(23) ;
(24) for   to   do
(25)   if    and    then
(26)       ;
(27)   end
(28) end
(29) until   is empty;
(30) return