blob: 05d7e548b7dbf72c4f09e0544ac6587484da6ddf [file] [log] [blame]
Frédéric Lécaille4891e402018-06-19 14:06:07 +02001 * Regression testing for HAProxy with varnishtest *
2
3
4This little README file is about how to compile and run varnishtest test case files (VTC files) to test HAProxy for any regression.
5
6To do so, you will have to compile varnishtest program sources which comes with
7Varnish cache application. varnishtest is a very useful program which has been
8developed to test Varnish cache application. varnishtest has been modified in
9collaboration with Varnish cache conceptor Poul-Henning Kamp to support HAProxy in
10addition to Varnish cache.
Jarno Huuskonen1261a872019-01-09 15:42:25 +020011See also: doc/regression-testing.txt
Frédéric Lécaille4891e402018-06-19 14:06:07 +020012
13* varnishtest compilation *
14
15 - Clone recent Varnish cache sources which may be found in this GitHub repository
16 https://github.com/varnishcache/varnish-cache:
17
18 $ git clone https://github.com/varnishcache/varnish-cache
19
20 - Compile Varnish cache sources:
21
22 $ cd varnish-cache && ./autogen.sh && ./configure && make
23
24 Then varnishtest program may be found in bin/varnishtest directory.
25 VTC files for Varnish cache may be found in bin/varnishtest/tests directory.
26 The Varnish cache manuals are located in 'man' directory. You will have to
27 have a look at varnishtest(7) and vtc(7) manuals.
28
29 Some information may also be found in doc/regression-testing.txt in HAProxy
30 sources.
31
32
33* varnishtest execution *
34
35 You must set HAPROXY_PROGRAM environment variable to give the location
36 of the HAProxy program to test to varnishtest:
37
Jarno Huuskonen1261a872019-01-09 15:42:25 +020038 $ HAPROXY_PROGRAM=<my haproxy program> varnishtest [-Dno-htx=] ...
Frédéric Lécaille4891e402018-06-19 14:06:07 +020039
40 The HAProxy VTC files found in HAProxy sources may be run with the reg-tests
41 Makefile target. You must set the VARNISHTEST_PROGRAM environment variable to
42 give the location of the varnishtest program which has been previously compiled.
43
44 $ VARNISHTEST_PROGRAM=<my varnishtest program> HAPROXY_PROGRAM=<my haproxy program> make reg-tests
45
46 Note that varnishtest is run with -t5 and -l option. -l option is to keep
47 keep varnishtest temporary directory in case of failed test cases. core files
48 may be found in this directory (if enabled by ulimit).
49
50
51* varnishtest patches for HAProxy VTC files *
52
53 When producing a patch to add a VCT regression testing file to reg-tests directory,
54 please follow these simple rules:
55
56 - Add the commit number on the first line.
57 - Then, copy and paste the commit log.
58 - If your VTC file needs others files, use the same basename as that of the VTC
59 file.
60 - Put these files in a directory with the same name as the code area concerned
61 by the bug ('peers', 'lua', 'acl' etc).
62
63