LuaUnit is a popular unit-testing framework for Lua, with an interface typical of xUnit libraries (Python unittest, Junit, NUnit, ...). It supports several output formats (Text, TAP, JUnit, ...) to be used directly or work with Continuous Integration platforms (Jenkins, Maven, ...).
OTHER License
Bot releases are hidden (Show)
I am happy to announce a new release of LuaUnit v3.4
assertAlmostEquals()
works also on tables and nested structuresLUAUNIT_OUTPUT
setOutputType()
accepts the xml filename as second argument when using the format junitskip()
and skipIf()
assertErrorMsgContentEquals()
to validate exactly any error messageSTRIP_EXTRA_ENTRIES_IN_STACK_TRACE
assertTableContains()
and assertNotTableContains()
to verify the presence of a given value within a tableTABLE_EQUALS_KEYBYCONTENT
, it did not make senseassertIs()
/assertNotIs()
deals better with protected metatablesassertEquals()
deals better with tables containing cycles of different structurePublished by bluebird75 over 6 years ago
I am happy to announce the release of LuaUnit v3.3 . The v3.2 release saw 245k download on lua rocks, I hope this release will please our users equally.
LuaUnit is a popular unit-testing framework for Lua, with an interface typical of xUnit libraries (Python unittest, Junit, NUnit, ...). It supports
several output formats (Text, TAP, JUnit, ...) to be used directly or work with Continuous Integration platforms (Jenkins, Hudson, ...).
This version can be downloaded with LuaRocks or from the GitHub project page ( https://github.com/bluebird75/luaunit ). Beware that to install with LuaRocks, you will need the version 2.4.4 released a few days ago (due to GitHub requiring a more recent wget).
My favourite update of this release is smart list difference analysis :
-- lua test code. Can you spot the difference ?
function TestListCompare:test1()
local A = { 121221, 122211, 121221, 122211, 121221, 122212, 121212, 122112, 122121, 121212, 122121 }
local B = { 121221, 122211, 121221, 122211, 121221, 122212, 121212, 122112, 121221, 121212, 122121 }
lu.assertEquals( A, B )
end
$ lua test_some_lists_comparison.lua
TestListCompare.test1 ... FAIL
test/some_lists_comparisons.lua:22:
List difference analysis:
* lists A (actual) and B (expected) have the same size
* lists A and B start differing at index 9
* lists A and B are equal again from index 10
* Common parts:
= A[1], B[1]: 121221
= A[2], B[2]: 122211
= A[3], B[3]: 121221
= A[4], B[4]: 122211
= A[5], B[5]: 121221
= A[6], B[6]: 122212
= A[7], B[7]: 121212
= A[8], B[8]: 122112
* Differing parts:
- A[9]: 122121
+ B[9]: 121221
* Common parts at the end of the lists
= A[10], B[10]: 121212
= A[11], B[11]: 122121
The other changes are :
General
New command-line arguments:
Scientific computing dedicated support (see documentation):
Platform and continuous integration support:
General doc improvements (detailed description of all output, more cross-linking between sections)
Published by bluebird75 over 6 years ago
The release of LuaUnit v3.3 brings the following improvements :
Published by bluebird75 about 8 years ago
Published by bluebird75 over 9 years ago
Important note when upgrading to version 3.1 : assertions functions are
no longer exported directly to the global namespace. See documentation for upgrade
paths.
Published by bluebird75 about 10 years ago
New release with full documentation, must better table assertions, junit output support and many more improvements.