EnglishFrenchSpanish

OnWorks favicon

varnishtest - Online in the Cloud

Run varnishtest in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command varnishtest that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

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 language. The best
reference for writing scripts is the varnishtest program itself. In the Varnish source
code repository, under bin/varnishtest/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.

Use varnishtest online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    strikr
    strikr
    Strikr Free Software project. Artifacts
    released under a 'intent based'
    dual license: AGPLv3 (community) and
    CC-BY-NC-ND 4.0 international
    (commercial)...
    Download strikr
  • 3
    GIFLIB
    GIFLIB
    giflib is a library for reading and
    writing gif images. It is API and ABI
    compatible with libungif which was in
    wide use while the LZW compression
    algorithm was...
    Download GIFLIB
  • 4
    Alt-F
    Alt-F
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • 5
    usm
    usm
    Usm is a unified slackware package
    manager that handles automatic
    dependency resolution. It unifies
    various package repositories including
    slackware, slacky, p...
    Download usm
  • 6
    Chart.js
    Chart.js
    Chart.js is a Javascript library that
    allows designers and developers to draw
    all kinds of charts using the HTML5
    canvas element. Chart js offers a great
    array ...
    Download Chart.js
  • More »

Linux commands

Ad