Finalize a testcase and optionally return no. of failed asserts as an exit_code. Initialize a test case.