Research Article

Location-Based Test Case Prioritization for Software Embedded in Mobile Devices Using the Law of Gravitation

Algorithm 2

Creating a FaS.
Input:
//a set of device clusters
//a set of test cases
Output:
FTS //a set of faulted test cases
(1);
(2)While () do
(3);
(4)For each
(5)  Randomly select one d (i.e., ds) from ;
(6)  Select the test case (i.e., ts) which tests the software of ds;
(7)  ;
(8)End for
(9)For each
(10)  Execute t;
(11)  if (t detects faults) then
(12)   put t into FTS;
(13)  End if
(14)End for
(15)End while
(16)Return FTS