Skip to content

ow.test

Nuno Aguiar edited this page Dec 29, 2017 · 2 revisions

ow.test.assert

ow.test.assert(aResult, checkValue, errorMessage, notShowDiff)

Will throw an exception if aResult is different from checkValue. The exception will contain the errorMessage and the different values (if notShowDiff = true).
(available after ow.loadTest())


ow.test.getChannel

ow.test.getChannel() : Channel

Gets the current channel being used for test results.


ow.test.reset

ow.test.reset()

Resets the internal test counters (test, pass and fail).
(available after ow.loadTest())


ow.test.setMemoryProfile

ow.test.setMemoryProfile(aBooleanSetting)

Turns on (off by default) the gathering of memory differences if aBooleanSetting = true.


ow.test.setOutput

ow.test.setOutput(aBooleanSetting)

Turns off (on by default) the output of the result of each test.


ow.test.setShowStackTrace

ow.test.setShowStackTrace(aBooleanSetting)

Turns on (off by default) the display of java stack trace on java exceptions if aBooleanSetting = true.


ow.test.start

ow.test.start(aKey) : String

Starts a timer for the provided aKey to determined the elapsed time when ow.test.stop(aKey) is invoked. Returns the aKey provided.


ow.test.stop

ow.test.stop(aKey) : Number

Stops an existing timer for the provided aKey to determine the elapsed time since a ow.test.start(aKey) was invoked.


ow.test.test

ow.test.test(aTest, aFunction) : Object

Test aFunction for a test named aTest.  If aTest is divided with "::" the first part sill be consider to be a test suite name. Will return whatever the function returns.
(available after ow.loadTest())


ow.test.testExternally

ow.test.testExternally(aTest, aCommand, aTimeout) : Object

Test executing aCommand for a give aTimeout (if provided) for a test named aTest. If aTest is divided with "::" the first part will be consider to be a test suite name. Will return whatever the command returns.
(available after ow.loadTest())


ow.test.toJUnitXML

ow.test.toJUnitXML(testSuitesId, testSuitesName) : String

Returns a JUnit results XML using testSuitesId and testSuitesName as identifiers.

Clone this wiki locally