Input: method sequences Paths, pre-conditions Pres, post-conditions Posts |
Output: condition testing report CR |
(01) for (each Path in Paths) |
(02) for (each method in Path) |
(03) { |
(04) if (method has pre-condition(Prc)) |
(05) { |
(06) call TCES to generate test cases that meet Prc; |
(07) run method; |
(08) if (method throws exceptions) |
(09) { |
(10) catch the exceptions; |
(11) The information including exceptions, test cases, method, and pre-condition are recorded into CR; |
(12) } |
(13) if (post-condition is violated) |
(14) The information including test cases, method, and pre-condition are recorded into CR; |
(15) call PCMA to obtain mutated constraint equation set S; |
(16) call TCES to solve S; |
(17) run method; |
(18) if (method is run successfully and actual result is different from expected result) |
(19) The information including test cases, method, and mutated condition are recorded into CR; |
(20) } |
(21) else |
(22) { |
(23) some fuzzed values and boundary values are generated to run method; |
(24) if (post-condition is violated) |
(25) The information including test cases, method, and post-condition information are recorded into CR; |
(26) } |
(27) } |
(28) return CR; |