Parameterize loops in tests