The answer is certainly not like this, AFAIK none of the kits automatically generate code. To do this kind of tests with OCUnit you would use one of a bunch of macros to test that exceptions are thrown or not, for instance: - (void) testSetRatioRange { STAssertNoThrow ([x setRatio: minimum], nil); STAssertNoThrow ([x setRatio: maximum], nil); STAssertThrowsSpecificNamed ([x setRatio:minimum - epsilon], NSException, NSInvalidArgumentException, nil); STAssertThrowsSpecificNamed ([x setRatio:maximum + epsilon], NSException, NSInvalidArgumentException, nil); } I'm not sure that automatically generating such code is worth the effort.