Another approach is to store the test information at the end in the process dictionary and still return an integer from this. The test can access the information in the process dictionary (or a shared ets table or something else).