Class TestReporting
java.lang.Object
com.codename1.testing.TestReporting
public class TestReporting
extends java.lang.Object
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'.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinishedTestCase(UnitTest test, boolean passed) Deprecated
voidfinishedTestCase(String testName, boolean passed) Invoked when a unit test has completedstatic TestReportingGets the test reporting instancevoidlogException(Throwable err) Indicates an error from the current test casevoidlogMessage(String message) Indicates a message from the current test casestatic voidSets the test reporting instance to a subclass of this class.voidstartingTestCase(UnitTest test) Deprecated
voidstartingTestCase(String testName) Invoked when a unit test is startedvoidDeprecated
voidtestExecutionFinished(String testSuiteName) Callback to indicate the test execution has finished allowing for a report to be generated if appropriatevoidwriteReport(java.io.OutputStream os) Deprecated
voidwriteReport(String testSuiteName, java.io.OutputStream os) Writes a test report to the given streamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TestReporting
public TestReporting()
-
-
Method Details
-
getInstance
Gets the test reporting instance -
setInstance
Sets the test reporting instance to a subclass of this class.
Parameters
i: the new instance
-
startingTestCase
Invoked when a unit test is started -
startingTestCase
Deprecated
this method is no longer invoked by the testing framework; please use
#startingTestCase(String) -
logMessage
Indicates a message from the current test case
Parameters
message: the message
-
logException
Indicates an error from the current test case
Parameters
err: the error message
-
finishedTestCase
Invoked when a unit test has completed
Parameters
-
testName: the name of the test case -
passed: true if the test passed and false otherwise
-
-
finishedTestCase
Deprecated
this method is no longer invoked by the testing framework; please use
boolean) -
writeReport
Writes a test report to the given stream
Parameters
-
testSuiteName: the name of the test suite -
os: the destination stream
- Throws:
java.io.IOException
-
-
writeReport
public void writeReport(java.io.OutputStream os) throws java.io.IOException Deprecated
this method is no longer invoked by the testing framework; please use
OutputStream)- Throws:
java.io.IOException
-
testExecutionFinished
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)
-