/**
  * Report the test results for a test case.
  *
  * @param apiClient
  * @param testPlan
  * @param tc
  * @param buildName
  * @throws TestLinkAPIException
  */
 public static void reportTestResult(
     TestLinkAPIClient apiClient, TestLinkTestPlan testPlan, TestCase tc, String buildName)
     throws TestLinkAPIException {
   TestCaseExecutor te = tc.getExecutor();
   if (te != null) {
     reportTestResult(apiClient, testPlan, tc, te, buildName);
   } else {
     throw new TestLinkAPIException(
         "No executor registered with the test case " + tc.getTestCaseName() + ".");
   }
 }
 /**
  * Report the test results for a test case with external TestExecutor.
  *
  * @param apiClient
  * @param testPlan
  * @param tc
  * @param te
  * @param buildName
  * @throws TestLinkAPIException
  */
 public static void reportTestResult(
     TestLinkAPIClient apiClient,
     TestLinkTestPlan testPlan,
     TestCase tc,
     TestCaseExecutor te,
     String buildName)
     throws TestLinkAPIException {
   String result = TestLinkAPIConst.TEST_FAILED;
   if (te.getExecutionResult() == TestCaseExecutor.RESULT_PASSED) {
     result = TestLinkAPIConst.TEST_PASSED;
   } else if (te.getExecutionResult() == TestCaseExecutor.RESULT_BLOCKED) {
     result = TestLinkAPIConst.TEST_BLOCKED;
   }
   apiClient.reportTestCaseResult(
       testPlan.getProject().getProjectName(),
       testPlan.getTestPlanName(),
       tc.getTestCaseName(),
       buildName,
       te.getExecutionNotes(),
       result);
 }