varnishtest

50 %
50 %
Information about varnishtest

Published on May 27, 2016

Author: Varnish_software

Source: slideshare.net

1. VARNISHTEST

2. A (not) well documented test tool

3. Arianna Aondio Field Engineer WHO AM I?  Email: arianna.aondio@varnish-software.com  Twitter: aondio_  Github: aondio

4. AGENDA  What (is varnishtest)?  Where (is it)?  When (should it be used)?  Who (should use it)?  Why (should I learn about it)?  How (to implement one)?  Questions

5. WHAT (IS VARNISHTEST) ? Script driven program that lets you test your Varnish

6. WHERE (IS IT) ? If you have Varnish installed, you already have it. SURPRISE

7. WHEN (SHOULD IT BE USED) ? You don't know what's happening with your Varnish in production Brilliant solution Test

8. WHO (SHOULD USE IT) ? Developers VMODS writers, ergo developers Whoever wants to learn about Varnish

9. WHY (SHOULD I LEARN ABOUT IT) ? Mostly because you don't want your Varnish to explode...

10. ...but if it happens you want to debug it as soon as possible!

11. HOW? It’s easy ServerVarnishClient

12. server s1 { rxreq txresp -hdr "x-continent: Europe" } -start DEFINE A SERVER

13. varnish v1 -vcl+backend { sub vcl_recv { if (req.http.x-city == "London") { set req.http.x-country = "UK"; return (hash); } } sub vcl_deliver { set resp.http.x-country = req.http.x-country; } } -start DEFINE A VARNISH INSTANCE

14. client c1 { txreq -hdr "x-city == London” rxresp expect resp.http.x-country == "UK" expect resp.http.x-continent == "Europe" } -run DEFINE A CLIENT

15. STICK THEM TOGETHER server s1 { rxreq txresp -hdr "x-continent: Europe" } -start varnish v1 -vcl+backend { sub vcl_recv { if (req.http.x-city == "London") { set req.http.x-country = "UK"; return (hash); } } sub vcl_deliver { set resp.http.x-country = req.http.x-country; } } -start client c1 { txreq -hdr "x-city: London" rxresp expect resp.http.x-country == "UK" expect resp.http.x-continent == "Europe" } -run

16. Run this command: varnishtest my-beautiful-tc.vtc It passes It fails

17. Run varnishtest in verbose mode and get a full log output: varnishtest -v my-beautiful-tc.vtc Useful to understand...

18. ...why your test case fails

19. Or why it works

20. QUESTIONS ?

21. THANK YOU

Add a comment

Related presentations

Related pages

varnishtest — Varnish version trunk documentation

DESCRIPTION¶ The varnishtest program is a script driven program used to test the Varnish Cache. The varnishtest program, when started and given one or ...
Read more

varnishtest — Varnish version 3.0.7 documentation

DESCRIPTION¶ The varnishtest program is a script driven program used to test the Varnish Cache. The varnishtest program, when started and given one or ...
Read more

GitHub - nstielau/cucumber-varnishtest: Cucumber Steps for ...

README.md Cucumber Varnishtest. This let's you use Gherkin, the language of BDD, to write behavior-level checks for your VCL. Project status
Read more

Testing Varnish Using Varnishtest - The New York Times

Testing with varnishtest made a huge impact when working with VCL. There is a bit of a learning curve to get started, so I wanted to share what ...
Read more

Getting Started with Varnishtest | Clock

Common Pitfalls to Avoid 1. False negatives. In varnishtest, a script is considered to be successful if there are no errors or failed expectations.
Read more

varnishtest — Varnish v2.1 documentation

DESCRIPTION¶ The varnishtest program is a script driven program used to test the varnish HTTP accelerator. The varnishtest program, when started and given ...
Read more

varnishtest man page | ManKier

Parameters you define with varnishtest -p may be overriden by parameters needed by varnishtest to run properly, and they may in turn be overriden by ...
Read more

GitHub - Zenika/varnishtest-exec

varnishtest-exec is a portable Java library for varnishtest, the test framework for Varnish Cache. This framework is used by the Varnish project, and ...
Read more

Ubuntu Manpage: varnishtest - Test program for Varnish

Provided by: varnish_4.0.3-1_i386 NAME varnishtest - Test program for Varnish SYNOPSIS varnishtest [-iklLqv] [-n iter] [-D name=val] [-j jobs] [-t duration ...
Read more

The Varnish Book for Varnish 4.0 — The Varnish Book

The Varnish Book for Varnish 4.0 ... Understanding Last-Modified and If-Modified-Since in varnishtest; Understanding Cache-Control in varnishtest;
Read more