Fix the incorrect test case status

Using getFailCount and getExceptionCount to determine if the current
test case has failed tests