Overview
BTD is meant to be a "Development Environment" (as opposed to an
"Integrated Development Environment") or a suit of tools that can be
run from the command line or from scripts to help automate all
"boring" stuff while developing (Lua) software. BTD is free software
and uses the same
license as Lua 5.1
Status
Current version is 1.7.0 and was developed for Lua 5.1.
- Unit testing
-
Since all foreseen functionality is present I consider this part
finished (apart from bugfixes, further cleaning up the output, or
other irrelevant changes).
- GUI (IUP) testing
- All functionality is foreseen, but :
- the test robot only works under windows
- up to now only the basic controls can be simulated
Download
BTD can be downloaded from its
LuaForge page.
Dependencies
BTD depends on
luafilesystem 1.4.2
and on
Lua Lanes 2.0.3.
History
- BTD 1.7.0 - 17 Apr 2009
-
- Unit test : clean up
-
- running single test method did not work
- further clean up report output
- Gui test : new features
-
- windows test robot (mouse and keyboard control)
- test robot lua integration
- sequencer for generating windows events
- BTD 1.6.0 - 8 Mar 2009
-
WARNING : allthough, what I consider :o), well
designed unit tests (one test class per file, no coupling between
test methods) should run without modification. This might not be
the case if unit tests are designed differently. For the time
being (and until a solution has been found) I will still maintain
the BTD 1.5.2 version, it is included as
TestDepr.lua.
- Unit test : new features
-
-
implemented multi tasking with Lua Lanes, which gives
following features :
-
all test classes and test methods run in parallel and
in their own environment
-
option
TestClass.testMethodTime to abort
test method of it exeeds the specified time
-
option
TestClass.Serial or
TestClass.testMethodSerial to run all or
the marked test methods serial instead of parallel
(eg. control access to shared resources)
-
option
TestClass.Abort to abort series of
serialised test methods on failure on one of them
-
reporting while running the tests is limited to
outputting characters
o, f or e for
respectively a succeeded and a failed test or a
framework error. The test classes give the same
output in uppercase
-
full reporting (emulating the previous output
format) is started after completing all tests.
First all results are output followed by a
summary of failed tests
-
test runner changes :
-
option
TestRunner.silent for suppressing
reporting
-
command
TestRunner:report() for triggering
(as yet unreported) report output
-
command
reportAll for triggering (all)
report output
-
two new test methods complementary to the existing ones :
-
test.differs(param 1,param 2) parameters
not equals
-
test.succeeds(function,parameters)
function does not throw error
-
updated examples : given the scope of the changes some
50 examples are included which demonstrate various parts
of the provided functionality
- Unit test : clean up
-
-
changed all error handling code (or lack thereof) to
be handled by the framework
-
eventual errors in the framework (missing test classes
or methods or setup or teardown errors or...) are
reported with
framework failed
-
to better suit multi tasking paradigm, split the
Test.lua class in TestClass.lua
and TestMethod.lua, to respectively handle
the class and the method runners/reporting
-
every class
Test, TestClass
and TestMethod handles reporting at it's level
- changed verbosity to a bool
-
cleaned up
fails method in
TestApi.lua class
-
cleaned up
equals method in
TestApi.lua class
- BTD 1.5.2 - 21 Feb 2009
-
- Unit test : clean up
-
- updated documentation
-
changed class name
Api.lua to
TestApi.lua
- updated
Test.lua
- updated examples
- GUI test : clean up
-
- updated documentation
- changed order of idle processing in
iupLoop
-
changed class name
Iup.lua to
TestIup.lua
- updated examples
- BTD 1.5.1 - 16 Feb 2009
-
- Unit test : new features
-
- support for a new output format for failed tests
- command line parameters for verbosity and IDE integration
- report individual and total test time
- report absolute directory in failed tests
- Unit test : clean up
-
-
split up LuaUnit in 3 classes (
Api.lua,
Result.lua and Test.lua)
-
included functionality of
Result.lua in
Test.lua (merged)
-
use of
self as foreseen in Lua guidelines
(> OOP)
- changed all global to local variables
-
changed all global to local functions (except
Api.lua where the original functions are
exported to global environment)
-
minimise coupling between tests by restoring
_G' environment and 'package.loaded' between
test methods and between test classes
-
changed 'Test.run' method to accept packages (eg.
a.b.c.Testd)
-
updated
LuaUnit.strip_luaunit_stack to use
patterns
- changed comments to LuaDoc format
-
integrated small or one-shot functions in calling
functions
- GUI test : new features
-
- break IUP main loop
- replace IUP idle loop
- BTD 1.4 - 30 Nov 2008
-
- Unit test : new features
-
-
changed
assertEquals to recursively check
table results, also enables checking multi result
functions assertEquals({fx},{res1,res2,..})
-
added
LuaUnit:clear() : clear statistics
data
-
added
LuaUnit:clearAll() : clear all loaded
TestXXX classes from the global environment
-
added
test:setUpClass() and
test:tearDownClass()
- Unit test : clean up
-
- fixed calling from the shell
-
removed deprecated functions :
table.foreach,
.foreachi, .getn and
.setn
-
removed
orderedNext,
orderedPairs : replaced by
table.sort()
-
updated
LuaUnit.strip_luaunit_stack to
properly skip last xpcall and two former
lines from stack_trace
-
removed
LuaUnit.strsplit, only used in
LuaUnit.strip_luaunit_stack
- BTD = LuaUnit 1.3 fork - Nov 2008
- See history LuaUnit and/or CHANGES.TXT file in distribution
Road map
- Build
-
- Provide clean environment for testing/deploying.
- Run code coverage or analysing tools.
- ...
- Unit test
-
-
No extra functionality foreseen, just eventual bugfixes or
cosmetical changes (eg. reporting format,...). The unit
testing framework can be extended to include GUI testing (or
functional and/or integration testing ?).
- GUI test
-
-
To attain maximum usability a robot is necessary which can
(under control of the testing framework) fire keyboard events,
move the mouse, click buttons,...
-
Different utility methods for GUI testing (eg.query coordinates of
objects on screen, move mouse to coordinates immediately/smooth,
activate a GUI object,...
- ...
- Deploy
-
- Compile
- Compile to stand alone
- Package
- ...
Credits
- BTD - unit test component based on LuaUnit
- Web site design based on Copas
- Logo based on graphic design by Alexandre Nakonechnyj
- LuaForge for providing project space and management tools
Contact us