Class TestReporting
java.lang.Object
com.codename1.testing.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'.
-
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 appropriatevoidDeprecated
voidwriteReport(String testSuiteName, OutputStream os) Writes a test report to the given streamMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()booleanIndicates whether some other object is "equal to" this one.final ClassgetClass()Returns the runtime class of an object.inthashCode()Returns a hash code value for the object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
-
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:
IOException
-
-
writeReport
Deprecated
this method is no longer invoked by the testing framework; please use
OutputStream)- Throws:
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)
-