A framework for multivariate testing