public class TestReporting
- Object
- TestReporting
Test reports can be overriden to provide custom test reporting options
you can replace the test reporter on the device by sending the build
argument build.testReporter=‘com.x.MyTestReporterClass’.
Constructors
public TestReporting() |
Methods
Inherited methods
Constructor details
TestReporting
public TestReporting()Method details
getInstance
public static TestReporting getInstance()Gets the test reporting instance
setInstance
public static void setInstance(TestReporting i)Sets the test reporting instance to a subclass of this class.
Parameters
iTestReporting- the new instance
startingTestCase
public void startingTestCase(String testName)Invoked when a unit test is started
startingTestCase
public void startingTestCase(UnitTest test)Deprecated. this method is no longer invoked by the testing framework; please use
#startingTestCase(String)logMessage
public void logMessage(String message)Indicates a message from the current test case
Parameters
messageString- the message
logException
public void logException(Throwable err)Indicates an error from the current test case
Parameters
errThrowable- the error message
finishedTestCase
public void finishedTestCase(String testName, boolean passed)Invoked when a unit test has completed
Parameters
testNameString- the name of the test case
passedboolean- true if the test passed and false otherwise
finishedTestCase
public void finishedTestCase(UnitTest test, boolean passed)Deprecated. this method is no longer invoked by the testing framework; please use
boolean)writeReport
public void writeReport(String testSuiteName, OutputStream os)
throws IOExceptionWrites a test report to the given stream
Parameters
testSuiteNameString- the name of the test suite
osOutputStream- the destination stream
Throws
writeReport
public void writeReport(OutputStream os)
throws IOExceptionDeprecated. this method is no longer invoked by the testing framework; please use
OutputStream)Throws
testExecutionFinished
public void testExecutionFinished(String testSuiteName)Callback to indicate the test execution has finished allowing
for a report to be generated if appropriate
testExecutionFinished
public void testExecutionFinished()Deprecated. this method is no longer invoked by the testing framework; please use
#testExecutionFinished(String)