Generate test cases from an iterable