optimise tests