Zenika / varnishtest-exec

Apache License 2.0
2 stars 0 forks source link

Create a Varnish JUnit Rule #1

Open fbiville opened 10 years ago

fbiville commented 10 years ago

... which would take either a backend port or nothing (in case of mocked backends).

dridi commented 10 years ago

Hey,

Thank you for your suggestion. Despite the lack of feedback I've been pondering how I could design such a @Rule, but nothing came up.

I'd rather see a @Rule for the backend, handling all the nitty-gritty. You can then fire a varnishtest instance and pass the port number as a macro. If you have multiple test cases you would like to run against your backend, you can use a parameterized test. Having a @Rule for your backend would allow stop/cleanup/start between tests.

I could maybe create a fixture to list tests, but it's just a matter of listing files following a pattern (eg. **.vtc) so I'm not sure how much value it would bring.

Dridi