Backport AddTest and CommitTest