Email Record: Least-cost testing sequence models with rework looping and time constraint.