Member-only story
How To Run E2E Tests With Venom In Minutes
No abstractions, no pages object models, no headaches.
It was, I think, around a year ago when I was looking for a simple solution to create end-to-end tests. Simple in the sense of not having to write too much code and not having to think too much about the design and abstractions.
After a while, I came across the Venom library from the French cloud provider OVH. It provides a declarative YAML-based interface to define HTTP requests and assertions. It also offers so-called executors, which, similar to plugins, allow integration with / testing of other systems like Redis, MongoDB, or Kafka.
With Venom, a simple e2e-test would look like this:
name: Generic 404 Handler
description: Is installed
testcases:
- name: /abcdef returns 404
steps:
- type: http
range:
- method: DELETE
- method: GET
- method: PATCH
- method: POST
- method: PUT
- method: DELETE
method: "{{.value.method}}"
url: http://host.docker.internal:8080/abcdef
headers:
Content-Type: application/json
timeout: 1
assertions:
- result.statuscode MustEqual 404
- result.timeseconds MustBeLessThan 1
- result.headers.Content-Type MustEqual…





