BTD
build-test-deploy Development Environment

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.6.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
Works, but in need of a robot.

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.6.0 - xx Feb 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. Together with improved error handling, this means that the framework should not abort abnormally anymore.
    • extra option maximum time TestClass:testMethod.time : if a test method (including eventual setUp and/or tearDown methods) does not terminate in the alocated time it will be aborted with an appropriate error message
    • extra option serial TestClass.Serial or TestClass:testMethodSerial : to be able to control access to (by test methods) shared resources (files, sockets, screen,...) , all methods marked with the serial flag will run one by one
    • 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 : silent option for suppressing reporting and report and reportAll for triggering report output
  • two new test methods complementary to the existing ones test.differs(param 1,param 2) and test.succeeds(function,parameters)
  • for serialised test methods only : option to abort remaining tests upon failure of a test method
  • 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

Valid XHTML 1.0!

$Id: index.html$