catch error state in function cast to avoid core dump
1. add dryRun option to list tests 2. group all cases into p0 p1 p2