aboutsummaryrefslogtreecommitdiff
path: root/test/README.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/README.md59
1 files changed, 59 insertions, 0 deletions
diff --git a/test/README.md b/test/README.md
new file mode 100644
index 00000000..c374438f
--- /dev/null
+++ b/test/README.md
@@ -0,0 +1,59 @@
1#LuaRocks testsuite
2##Overview
3Test suite for LuaRocks project with Busted unit testing framework(http://olivinelabs.com/busted/).
4
5* Contains white-box & black-box tests
6* Easy setup for your purpose on command line or from configuration file
7
8
9## Dependencies
10* Lua >= 5.1
11* Busted with dependencies
12
13
14##Usage
15Running 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. Mandatory *-Xhelper* flag always needs version of Lua or LuaJIT (e.g. *lua=5.2.4* or *luajit=2.0.3*). Start tests inside LuaRocks folder or specify with *-C* flag.
16
17**Arguments for Busted helper script**
18
19```
20lua=<version>, !mandatory! type your full version of Lua (e.g. lua=5.2.4)
21OR
22luajit=<version>, !mandatory! type your full version of LuaJIT (e.g. luajit=5.2.4)
23
24env=<type>, (default:"minimal") type what kind of environment to use ["minimal", "full"]
25clean, remove existing testing environment
26travis, add just if running on TravisCI
27os=<version>, type your OS ["linux", "os x", "windows"]
28```
29---------------------------------------------------------------------------------------------
30####_**Tags** of tests are required and are in this format:_
31
32**whitebox** - run all whitebox tests
33
34**blackbox** - run all blackbox tests
35
36**ssh** - run all tests which require ssh
37
38**w**\_*name-of-command* - whitebox testing of command
39
40**b**\_*name-of-command* - blackbox testing of command
41
42for example: `b_install` or `w_help`
43
44###Examples
45To run white-box tests in LuaRocks directory type :
46
47`busted -t "whitebox"`
48
49To run black-box tests just of *install* command (we defined our OS, so OS check is skipped.):
50
51`busted -Xhelper lua=5.2.4,os=linux -t "b_install"`
52
53To run black-box tests of *install* command, whitebox of *help* command (using *full* type of environment):
54
55`busted -Xhelper lua=5.2.4,env=full -t "b_install", "w_help"`
56
57To run black-box tests without tests, which use ssh:
58
59`busted -Xhelper lua=5.2.4 -t "blackbox" --exclude-tags=ssh` \ No newline at end of file