Generating regression test cases