Examples of durationInMs()


Examples of org.sonar.api.batch.sensor.test.TestCaseExecution.durationInMs()

        .ofType(TestCaseExecution.Type.valueOf(type))
        .status(TestCaseExecution.Status.valueOf(status))
        .message(StringUtils.trimToNull(message))
        .stackTrace(StringUtils.trimToNull(stack));
      if (durationStr != null) {
        test.durationInMs(Long.parseLong(durationStr));
      }
      test.save();
    } catch (Exception e) {
      throw new IllegalStateException("Error processing line " + lineNumber + " of file " + testplanFile.getAbsolutePath(), e);
    }
View Full Code Here

Examples of org.sonar.api.batch.sensor.test.internal.DefaultTestCaseExecution.durationInMs()

    value.putUTF(((DefaultInputFile) t.testFile()).moduleKey());
    value.putUTF(((DefaultInputFile) t.testFile()).relativePath());
    value.putUTF(t.name());
    putUTFOrNull(value, t.message());
    putUTFOrNull(value, t.stackTrace());
    Long durationInMs = t.durationInMs();
    value.put(durationInMs != null ? durationInMs.longValue() : -1);
    value.put(t.type().ordinal());
    value.put(t.status().ordinal());
  }
View Full Code Here

Examples of org.sonar.api.batch.sensor.test.internal.DefaultTestCaseExecution.durationInMs()

      .name(name)
      .status(status)
      .message(message)
      .stackTrace(stack);
    if (duration != -1) {
      testCaseExecution.durationInMs(duration);
    }
    return testCaseExecution;
  }
}
View Full Code Here

Examples of org.sonar.api.test.MutableTestCase.durationInMs()

  private MutableTestCase testCase(String name, TestCase.Status status, Long durationInMs, int coveredLines, @Nullable String message, @Nullable String stackTrace) {
    MutableTestCase testCase = mock(MutableTestCase.class);
    when(testCase.name()).thenReturn(name);
    when(testCase.status()).thenReturn(status);
    when(testCase.durationInMs()).thenReturn(durationInMs);
    when(testCase.countCoveredLines()).thenReturn(coveredLines);
    when(testCase.message()).thenReturn(message);
    when(testCase.stackTrace()).thenReturn(stackTrace);
    return testCase;
  }
View Full Code Here

Examples of org.sonar.api.test.TestCase.durationInMs()

  private TestCase testCase(String name, TestCase.Status status, Long durationInMs, String testPlanKey, String testPlanLongName) {
    TestCase testCase = mock(TestCase.class);
    when(testCase.name()).thenReturn(name);
    when(testCase.status()).thenReturn(status);
    when(testCase.durationInMs()).thenReturn(durationInMs);

    TestPlan testPlan = mock(TestPlan.class);
    when(testPlan.component()).thenReturn(new ComponentDto().setKey(testPlanKey).setLongName(testPlanLongName));
    when(testCase.testPlan()).thenReturn(testPlan);
    return testCase;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.