From eddfa87fe331b97dc67f8778c6ebb58386cdf6f2 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 29 Sep 2017 19:35:51 -0300 Subject: Revise README.md for test/ --- test/README.md | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'test') diff --git a/test/README.md b/test/README.md index 5deaa175..8124a800 100644 --- a/test/README.md +++ b/test/README.md @@ -1,32 +1,34 @@ -#LuaRocks testsuite -##Overview + +# LuaRocks testsuite + +## Overview + Test suite for LuaRocks project with Busted unit testing framework(http://olivinelabs.com/busted/). * Contains white-box & black-box tests * Easy setup for your purpose on command line or from configuration file - ## Dependencies + * Lua >= 5.1 * Busted with dependencies +## Usage -##Usage -Running of tests is based on basic Busted usage. *-Xhelper* flag is mandatory for inserting arguments into testing (primary black-box). Flag *--tags=* or *-t* is mandatory for specifying which tests will run. Start tests inside LuaRocks folder or specify with *-C* flag. +Running of tests is based on basic Busted usage. *-Xhelper* flag is used +for inserting arguments into testing. Flag *--tags=* or *-t* is used +for specifying which tests will run. Start tests inside +LuaRocks folder or specify with *-C* flag. **Arguments for Busted helper script** ``` -lua=, !mandatory! type your full version of Lua (e.g. lua=5.2.4) -OR -luajit=, !mandatory! type your full version of LuaJIT (e.g. luajit=5.2.4) - -env=, (default:"minimal") type what kind of environment to use ["minimal", "full"] -noreset, Don't reset environment after each test -clean, remove existing testing environment -appveyor, add just if running on TravisCI -travis, add just if running on TravisCI -os=, type your OS ["linux", "os x", "windows"] +env=, (default:"minimal") type what kind of environment to use ["minimal", "full"] +noreset, Don't reset environment after each test +clean, remove existing testing environment +appveyor, add just if running on TravisCI +travis, add just if running on TravisCI +os=, type your OS ["linux", "os x", "windows"] ``` --------------------------------------------------------------------------------------------- ####_**Tags** of tests are required and are in this format:_ @@ -47,8 +49,10 @@ os=, type your OS ["linux", "os x", "windows"] for example: `b_install` or `w_help` -###Examples +## Examples + To run all tests: + `busted` To run white-box tests in LuaRocks directory type : @@ -57,12 +61,13 @@ To run white-box tests in LuaRocks directory type : To run black-box tests just of *install* command (we defined our OS, so OS check is skipped.): -`busted -Xhelper lua=5.2.4,os=linux -t "b_install"` +`busted -Xhelper os=linux -t "b_install"` To run black-box tests of *install* command, whitebox of *help* command (using *full* type of environment): -`busted -Xhelper lua=5.2.4,env=full -t "b_install", "w_help"` +`busted -Xhelper env=full -t "b_install", "w_help"` To run black-box tests without tests, which use ssh: -`busted -Xhelper lua=5.2.4 -t "blackbox" --exclude-tags=ssh` \ No newline at end of file +`busted -t "blackbox" --exclude-tags=ssh` + -- cgit v1.2.3-55-g6feb