BTD
build-test-deploy Development Environment

Reference

Following a list of all BTD functions, grouped by tool.
1. Unit test
As to 'namespace' the following initialisation code is assumed :
local test = require('btd.lua.test.lua')()
and for the actual test class :
local Api = require('btd.lua.testapi.lua')
also a test can be :
test:run()
test:run('ClassX')
test:run('TestClassX:testmethodY')
test:clear()
Clear test statistics.
test:clearAll()
Clear all test classes from global environment.
test:run()
Run all testmethod's from all TestClasses which can be found in the global environment.
test:run('ClassX','ClassY')
Run all testmethod's from the specified classes.
test:run('ClassX:methodY')
Run specified method from the specified class.
TestClassX:setUpClass()
Class initialisation code.
TestClassX:tearDownClass()
Class clean up code.
TestClassX:setUp()
Test method initialisation code.
TestClassX:tearDown()
Test method clean up code.
Api.equals(actual,expected)(or assertEquals(actual,expected) or assert_Equals(actual,expected))
Test whether result of test equals the expected result.
Api.fails('userfunction(???)')(or assertError('userfunction(???)') or assert_Error('userfunction(???)'))
Test whether the userfunction(???) throws an error.
TestClassX = Api.wrap('methodX','methodY',...)(or TestClassX = wrapFunctions('methodX','methodY',...))
Wrap methods into TestClassX
2. GUI test
As to 'namespace' the following initialisation code is assumed :
local Gui = require('btd.lua.testiup.lua')()
Gui.iupLoop(func)
If func is not a function (or nil) then the GUI under test will run completely, but will exit it's main loop the first time idle time processing is called. If it is a function the GUI under test will keep running it's main loop and do it's idle time processing (if any) followed by the function. The test must be terminated by the function.
See examples in test directories

Valid XHTML 1.0!

$Id: reference.html$