Research Article

CIPC: A Change Impact Propagation Computing Based Technique for Microservice Regression Testing Prioritization

Algorithm 3

Single-objective prioritization algorithm.
Declaration: singlePrioritization (CIT, T, TQ).
Parameters: CIT (in); T, test suite (in); TQ, testing queue(out).
(1)TQ←Queue()
(2)for each tpT do
(3)tp.V←{CIT(s), stp.S}
(4)if elementmax(tp.V) > elementmax(TQ.head.V) then
(5)  TQ.head ← tp
(6)end if
(7)end for
(8)T←T - {TQ.tail}
(9)while T≠∅ do
(10)tc'←T[0]
(11)for each tcT do
(12)  if dc(TQ.tail, tc) > dc(TQ.tail, tc') then
(13)   tc'←tc
(14)  end if
(15)end for
(16) TQ.tail←tc'
(17)T←T - {TQ.tail}
(18)end while