Giter Club home page Giter Club logo

luaunit's Introduction

LuaUnit

by Philippe Fremy

Build Status Documentation Status Bitdeli Badge

Luaunit is a unit-testing framework for Lua. It allows you to write test functions and test classes with test methods, combined with setup/teardown functionality. A wide range of assertions are supported.

Luaunit supports several output format, like Junit or TAP, for easier integration into Continuous Integration platforms (Jenkins, Maven, ...) . The integrated command-line options provide a flexible interface to select tests by name or patterns, control output format, set verbosity, ...

LuaUnit works with Lua 5.1 and 5.2 . It was tested on Windows XP and Ubuntu 12.04 (see continuous build results on Travis-CI ) and should work on all platforms supported by lua. It has no other dependency than lua itself.

LuaUnit is packed into a single-file. To make start using it, just add the file to your project.

Luaunit is now maintained on github: https://github.com/bluebird75/luaunit

It is released under the BSD license.

Documentation is available on read-the-docs

History

Version 3.0 - 9. Oct 2014

Since some people have forked LuaUnit and release some 2.x version, I am jumping the version number.

  • moved to Github
  • full documentation available in text, html and pdf at read-the-docs.org
  • new output format: JUnit
  • much better table assertions
  • new assertions for strings, with patterns and case insensitivity: assertStrContains, assertNotStrContains, assertNotStrIContains, assertStrIContains, assertStrMatches
  • new assertions for floats: assertAlmostEquals, assertNotAlmostEquals
  • type assertions: assertIsString, assertIsNumber, ...
  • error assertions: assertErrorMsgEquals, assertErrorMsgContains, assertErrorMsgMatches
  • improved error messages for several assertions
  • command-line options to select test, control output type and verbosity

Version 1.5 - 8. Nov 2012

  • compatibility with Lua 5.1 and 5.2
  • better object model internally
  • a lot more of internal tests
  • several internal bug fixes
  • make it easy to customize the test output
  • running test functions no longer requires a wrapper
  • several level of verbosity

Version 1.4 - 26. Jul 2012

  • switch from X11 to more popular BSD license
  • add TAP output format for integration into Jenkins
  • official repository now on github

Version 1.3 - 30. Oct 2007

  • port to lua 5.1
  • iterate over the test classes, methods and functions in the alphabetical order
  • change the default order of expected, actual in assertEquals (adjustable with USE_EXPECTED_ACTUAL_IN_ASSERT_EQUALS).

Version 1.2 - 13. Jun 2005

  • first public release

Version 1.1

  • move global variables to internal variables
  • assertion order is configurable between expected/actual or actual/expected
  • new assertion to check that a function call returns an error
  • display the calling stack when an error is spotted
  • two verbosity level, like in python unittest

luaunit's People

Contributors

bluebird75 avatar linuxmaniac avatar eburnette avatar jennal avatar ubreu avatar

Watchers

Italo Maia avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.