Debian Codegraph @

reg-tests/README

raw
1 * Regression testing for HAProxy with VTest *
2
3
4 This little README file is about how to compile and run vtest test case files (VTC files)
5 to test HAProxy for any regression.
6
7 To do so, you will have to compile vtest program sources which depends on
8 Varnish cache application sources. vtest, formerly varnishtest, is a very useful
9 program which has been developed to test Varnish cache application. vtest has been
10 modified in collaboration with Varnish cache conceptor Poul-Henning Kamp to support
11 HAProxy in addition to Varnish cache.
12
13 See also: doc/regression-testing.txt
14
15 * vtest compilation *
16
17 $ git clone https://github.com/vtest/VTest2
18
19 $ cd VTest
20
21 $ make vtest
22
23 Then vtest program may be found at the root directory of vtest sources directory.
24 The Varnish cache manuals are located in 'man' directory of Varnish cache sources
25 directory. You will have to have a look at varnishtest(7) and vtc(7) manuals to
26 use vtest.
27
28 Some information may also be found in doc/regression-testing.txt in HAProxy
29 sources.
30
31 Note that VTC files for Varnish cache may be found in bin/varnishtest/tests directory
32 of Varnish cache sources directory which may be found here:
33 https://github.com/varnishcache/varnish-cache
34
35
36 * vtest execution *
37
38 You must set HAPROXY_PROGRAM environment variable to give the location
39 of the HAProxy program to test to vtest:
40
41 $ HAPROXY_PROGRAM=<my haproxy program> vtest ...
42
43 The HAProxy VTC files found in HAProxy sources may be run with the reg-tests
44 Makefile target. You must set the VTEST_PROGRAM environment variable to
45 give the location of the vtest program which has been previously compiled.
46
47 $ VTEST_PROGRAM=<my vtest program> make reg-tests
48
49 "reg-tests" Makefile target run scripts/run-regtest.sh script.
50 To get more information about this script run it with --help option.
51
52 Note that vtest is run with -t10 and -l option. -l option is to keep
53 keep vtest temporary directory in case of failed test cases. core files
54 may be found in this directory (if enabled by ulimit).
55
56
57 * vtest patches for HAProxy VTC files *
58
59 When producing a patch to add a VTC regression testing file to reg-tests directory,
60 please follow these simple rules:
61
62 - If your VTC file needs others files, if possible, use the same basename as that
63 of the VTC file,
64 - Put these files in a directory with the same name as the code area concerned
65 by the bug ('peers', 'lua', 'acl' etc).
66
67 Please note that most tests use a common set of timeouts defined by the
68 environment variable HAPROXY_TEST_TIMEOUT. As much as possible, for regular I/O
69 (i.e. not errors), please try to reuse that setting so that the value may
70 easily be adjusted when running in some particularly slow environments, or be
71 shortened to fail faster on developers' machines.