org.sonar.api.batch.sensor.test
Interface TestCaseExecution

All Known Implementing Classes:
DefaultTestCaseExecution

public interface TestCaseExecution

Represents result of execution of a single test in a test file.

Since:
5.0

Nested Class Summary
static class TestCaseExecution.Status
          Test execution status.
static class TestCaseExecution.Type
          Test type.
 
Method Summary
 Long durationInMs()
          Duration in milliseconds
 TestCaseExecution durationInMs(long duration)
          Duration in milliseconds
 TestCaseExecution inTestFile(InputFile testFile)
          Set file where this test is located.
 String message()
          Message (usually in case of TestCaseExecution.Status.ERROR or TestCaseExecution.Status.FAILURE).
 TestCaseExecution message(String message)
          Message (usually in case of TestCaseExecution.Status.ERROR or TestCaseExecution.Status.FAILURE).
 String name()
          Name of this test case.
 TestCaseExecution name(String name)
          Set name of this test.
 TestCaseExecution ofType(TestCaseExecution.Type type)
          Type of test.
 void save()
          Call this method only once when your are done with defining the test case execution.
 String stackTrace()
          Stacktrace (usually in case of TestCaseExecution.Status.ERROR).
 TestCaseExecution stackTrace(String stackTrace)
          Set stacktrace (usually in case of TestCaseExecution.Status.ERROR).
 TestCaseExecution.Status status()
          Status of execution of the test.
 TestCaseExecution status(TestCaseExecution.Status status)
          Status of execution of the test.
 InputFile testFile()
          InputFile where this test is located.
 TestCaseExecution.Type type()
          Type of test.
 

Method Detail

testFile

InputFile testFile()
InputFile where this test is located.


inTestFile

TestCaseExecution inTestFile(InputFile testFile)
Set file where this test is located. Mandatory.


durationInMs

Long durationInMs()
Duration in milliseconds


durationInMs

TestCaseExecution durationInMs(long duration)
Duration in milliseconds


name

String name()
Name of this test case.


name

TestCaseExecution name(String name)
Set name of this test. Name is mandatory.


status

TestCaseExecution.Status status()
Status of execution of the test.


status

TestCaseExecution status(TestCaseExecution.Status status)
Status of execution of the test.


message

String message()
Message (usually in case of TestCaseExecution.Status.ERROR or TestCaseExecution.Status.FAILURE).


message

TestCaseExecution message(String message)
Message (usually in case of TestCaseExecution.Status.ERROR or TestCaseExecution.Status.FAILURE).


type

TestCaseExecution.Type type()
Type of test.


ofType

TestCaseExecution ofType(TestCaseExecution.Type type)
Type of test.


stackTrace

String stackTrace()
Stacktrace (usually in case of TestCaseExecution.Status.ERROR).


stackTrace

TestCaseExecution stackTrace(String stackTrace)
Set stacktrace (usually in case of TestCaseExecution.Status.ERROR).


save

void save()
Call this method only once when your are done with defining the test case execution.



Copyright © 2009–2015 SonarSource. All rights reserved.