varnishtest man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

VARNISHTEST(1)							VARNISHTEST(1)

NAME
       varnishtest - Test program for Varnish

SYNOPSIS
       varnishtest [-hikLlqvW] [-b size] [-D name=val] [-j jobs] [-n iter] [-t
       duration] file [file ...]

DESCRIPTION
       The varnishtest program is a script driven program  used	 to  test  the
       Varnish Cache.

       The  varnishtest	 program,  when	 started  and given one or more script
       files, can create a  number  of	threads	 representing  backends,  some
       threads representing clients, and a varnishd process. This is then used
       to simulate a transaction to provoke a specific behavior.

       The following options are available:

       -b size
	      Set internal buffer size (default: 512K)

       -D name=val	Define macro for use in scripts

       -h     Show help

       -i     Find varnishd in build tree

       -j jobs
	      Run this many tests in parallel

       -k     Continue on test failure

       -L     Always leave temporary vtc.*

       -l     Leave temporary vtc.* if test fails

       -n iterations
	      Run tests this many times

       -q     Quiet mode: report only failures

       -t duration
	      Time tests out after this long

       -v     Verbose mode: always report test log

       -W     Enable the witness facility for locking

       file		File to use as a script

       Macro definitions that can be overridden.

       varnishd		Path to varnishd to use [varnishd]

       If TMPDIR is set in  the	 environment,  varnishtest  creates  temporary
       vtc.* directories for each test in $TMPDIR, otherwise in /tmp.

SCRIPTS
       The script language used for Varnishtest is not a strictly defined lan‐
       guage. The best reference for writing scripts is the  varnishtest  pro‐
       gram itself. In the Varnish source code repository, under bin/varnisht‐
       est/tests/, all the regression tests for Varnish are kept.

       An example:

       varnishtest "#1029"

       server s1 {
	       rxreq
	       expect req.url == "/bar"
	       txresp -gzipbody {[bar]}

	       rxreq
	       expect req.url == "/foo"
	       txresp -body {<h1>FOO<esi:include src="/bar"/>BARF</h1>}

       } -start

       varnish v1 -vcl+backend {
	       sub vcl_backend_response {
		       set beresp.do_esi = true;
		       if (bereq.url == "/foo") {
			       set beresp.ttl = 0s;
		       } else {
			       set beresp.ttl = 10m;
		       }
	       }
       } -start

       client c1 {
	       txreq -url "/bar" -hdr "Accept-Encoding: gzip"
	       rxresp
	       gunzip
	       expect resp.bodylen == 5

	       txreq -url "/foo" -hdr "Accept-Encoding: gzip"
	       rxresp
	       expect resp.bodylen == 21
       } -run

       When run, the above script will simulate a server (s1) that expects two
       different  requests.  It	 will  start a Varnish server (v1) and add the
       backend definition to the  VCL  specified  (-vcl+backend).  Finally  it
       starts the c1-client, which is a single client sending two requests.

SEE ALSO
       · varnishtest source code repository with tests

       · varnishhist(1)

       · varnishlog(1)

       · varnishncsa(1)

       · varnishstat(1)

       · varnishtop(1)

       · vcl(7)

HISTORY
       The   varnishtest   program  was	 developed  by	Poul-Henning  Kamp  <‐
       phk@phk.freebsd.dk> in cooperation with Varnish Software AS.  This man‐
       ual   page   was	 originally  written  by  Stig	Sandbeck  Mathisen  <‐
       ssm@linpro.no>	 and	updated	   by	  Kristian     Lyngstøl	    <‐
       kristian@varnish-cache.org>.

COPYRIGHT
       This document is licensed under the same licence as Varnish itself. See
       LICENCE for details.

       · Copyright (c) 2007-2015 Varnish Software AS

								VARNISHTEST(1)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net