105 void Test(
string suite,
int timeoutS = 0,
int timeoutMs = 0,
int sortOrder = 0)
129 void Step(EStage stage = EStage.Main)
141 proto native
static bool Run();
147 proto native
static TestSuite
GetSuite(
int handle);
155 proto native
static void End();
164 proto native
void SetResult(TestResultBase res);
226class TestBoolResult : TestResultBase
230 void TestBoolResult(bool val) { Value = val; }
232 override bool Failure() { return !Value; }
234 override string FailureText()
236 // junit kind of error report. (simple)
237 return "<failure type=\"BoolResult\">Failed</failure>";
241//-----------------------------------------------------------------------------
242class MyHarness : TestHarness
246//-----------------------------------------------------------------------------
247class MyTestSuite : TestSuite
254 Print("MyTestSuite::Prep");
262 Print("MyTestSuite::Count: cnt=" + cnt);
266 [Step(EStage.TearDown)]
270 Print("MyTestSuite::CountUp: cnt=" + cnt);
275//-----------------------------------------------------------------------------
277TestResultBase MyTest()
280 return new TestBoolResult(true);
283//-----------------------------------------------------------------------------
285class MyAsyncTest : TestBase
298 Print("AsyncTest::Pool::counter=" + counter);
302 Print("AsyncTest::Pool::Result");
303 SetResult(new TestBoolResult(false));
307 Print("AsyncTest::Pool::Progress");
void SetEnabled()
prevents insider adding in the wrong position, HOTFIX
void Test(string suite, int timeoutS=0, int timeoutMs=0, int sortOrder=0)
Defines a suite the test belongs to, its timeout value and order within the suite.
proto native void SetResult(TestResultBase res)
proto native bool IsEnabled()
Enabled flag getter.
proto native TestResultBase GetResult()
Result getter.
proto native void SetEnabled(bool val)
Enables/Disables the test. Disabled tests won't run at all.
proto string GetName()
Test name getter. Strictly for UI porposes!
proto static native bool Finished()
Returns true when all tests and suites finished.
proto static native TestSuite GetSuite(int handle)
Returns a test suite.
proto static native void End()
Finalizes the testing process.
proto static native int GetNSuites()
Returns number of test suites.
static proto string Report()
Generates a xml report.
proto static native bool Run()
proto static native TestSuite ActiveSuite()
Returns currently active TestSuite or null when none is active.
proto static native void Begin()
Starts up the testing process and initializes the structures.
Collection and main interface of the Testing framework.
proto native bool IsEnabled()
Enabled flag getter.
void OnInit()
Callback for user defined initialization. Called for all suites during TestHarness....
class Test Stage
Attribute which marks a method as part of the testing process.
proto native int GetNTests()
Returns the number for tests within this suite.
TestHarness Managed SetResult(TestResultBase res)
Collection of tests.
string FailureText()
Text used for xml report output.
void Step(EStage stage=EStage.Main)
class Test Setup
Stage definition used in conjunction with Step attribute.
proto native TestBase GetTest(int handle)
Returns a test.
proto native string NativeFailureText()
TestBase Managed Failure()
Return true of the result means failure.
proto native bool NativeFailure()