DEVSUPPORT-1167: Refactor code in testing labels.