Testcase generation implementation.