The Allocation of Testing Resources