Factorization of tests