-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md.src
60 lines (41 loc) · 1.92 KB
/
README.md.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Introduction
============
Lux (LUcid eXpect scripting) is a test automation framework with
Expect style execution of commands. See [Expect][] for more info about
the origin.
With Lux it is possible to
* simplify automated testing
* control interactive programs by sending textual input to them and
using [regular expression][]s to ensure that their output matches the
expectations
* perform detailed post mortem analyzis of test suite results
* interactively debug and trace single test cases
* get editor support for editing scripts by using the [Emacs][] mode
The tool is written in [Erlang/OTP][] and requires its runtime
environment.
See the file **lux.html** for the full documentation or view it online
on [GitHub](https://github.com/hawk/lux/blob/master/doc/lux.md).
A sample script
---------------
Here is an example of a test script. It starts couple of concurrent
shells, sends text to them with the `!` command and matches expected
output with `?`.
#include <examples/intro.lux>
How to run the script
---------------------
Run a single script like this:
#eval-include lux examples/intro.lux
In this run we got a (brief) progress report of the test case on
stdout and a link to a summary log containing (lots of) details.
How to assemble the history of multiple runs
--------------------------------------------
In a nightly build environment it might be difficult to pinpoint when
a certain test case/suite started to fail. This process is greatly
simplified by running `lux` with the `--history` option as it will
assemble all test results as a timeline (interleaved with change-set
identities if provided with `--revision`).
#eval-silent lux --revision svn_4711 --run jenkins_17 examples
#eval-silent lux --revision svn_4712 --run jenkins_20 examples/intro.lux
#eval-silent lux --revision svn_4712 --run jenkins_20 examples/fail.lux
#eval-silent lux --revision svn_4715 --run jenkins_22 examples
#eval-include lux --history .