Make analytics testing more flexible