Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
V

venom

> 测试质量
Open source

Manage and run your integration tests with efficiency - Venom run executors (script, HTTP Request, web, imap, etc... ) and assertions

1.2K stars0 likes2 views
WebsiteGitHub

About

Manage and run your integration tests with efficiency - Venom run executors (script, HTTP Request, web, imap, etc... ) and assertions

Venom

Venom is a CLI (Command Line Interface) that aims to create, manage and run your integration tests with efficiency.

Table of contents

  • Venom
  • Table of contents
  • Overview
  • Installing
    • Install from binaries
  • Updating
  • Docker image
  • CLI Usage
    • Run test suites in a specific order
    • Globstar support
    • Variables
      • Variable Definitions Files
      • Environment Variables
    • Arguments
      • Define arguments with environment variables
    • Use a configuration file
  • Concepts
    • TestSuites
    • Executors
      • User defined executors
    • Variables
      • Testsuite variables
      • Variable helpers
    • Use outputs from a test step as input of another test step
    • Builtin venom variables
      • Secrets variables
    • Assertions
      • Keywords
        • Must keywords
        • User assertions
      • Using logical operators
  • Write and run your first test suite
  • Export tests report
  • Advanced usage
    • Debug your testsuites
    • Skip testcase and teststeps
    • Iterating over data
  • FAQ
    • Common errors with quotes
  • Use venom in CI/CD pipelines
  • Hacking
    • How to compile?
    • How to test?
      • Unit tests:
      • Integration tests:
  • Contributing
  • License

Overview

Venom allows you to handle integration tests the same way you code your application. With Venom, testcases will be managed as code: the readability of the tests means that the tests are part of the code reviews. Thanks to that, writing and executing testsuites becomes easier for developers and teams.

Concretely, you have to write a testsuite in a YAML file. Venom runs executors (scripts, HTTP Request, web, IMAP, etc.) and applies assertions. It can also generate xUnit result files.

Installing

Install from binaries

You can find the latest binary release at: https://github.com/ovh/venom/releases/latest/.

Example for Linux:

bash
$ curl https://github.com/ovh/venom/releases/download/v1.2.0/venom.linux-amd64 -L -o /usr/local/bin/venom && chmod +x /usr/local/bin/venom
$ venom -h

Updating

You can update to the latest version with venom update command:

bash
$ venom update

The venom update command will download the latest version and replace the current binary:

bash
Url to update venom: https://github.com/ovh/venom/releases/download/v1.2.0/venom.darwin-amd64
Getting latest release from: https://github.com/ovh/venom/releases/download/v1.2.0/venom.darwin-amd64 ...
Update done.

Check the new version with venom version command:

bash
$ venom version
Version venom: v1.2.0 

Docker image

Instead of installing (and updating) Venom locally, Venom can be started as a Docker image with the following commands.

Considering your testsuites are in ./tests directory in your current directory and your test library is under ./tests/lib, the results will be available under the results directory.

bash
$ mkdir -p results
$ docker run --mount type=bind,source=$(pwd)/tests,target=/workdir/tests --mount type=bind,source=$(pwd)/results,target=/workdir/results ovhcom/venom:latest 

Please refer to https://hub.docker.com/r/ovhcom/venom/tags to get the available image tags.

CLI Usage

venom CLI is composed of several commands:

bash
$ venom -h
Venom - RUN Integration Tests

Usage:
  venom [command]

Available Commands:
  help        Help about any command
  run         Run Tests
  update      Update venom to the latest release version: venom update
  version     Display Version of venom: venom version

Flags:
  -h, --help   help for venom

Use "venom [command] --help" for more information about a command.

You can see the help of a command with venom [command] -h:

…

Run test suites in a specific order

  • venom run 01_foo.yml 02_foo.yml will run 01 before 02.
  • venom run 02_foo.yml 01_foo.yml will run 02 before 01.

If you want to sort many testsuite files, you can use standard commands, example:

bash
venom run `find . -type f -name "*.yml"|sort`

Globstar support

The venom CLI supports globstar:

$ venom run ./foo/b*/**/z*.yml

Variables

To specify individual variables on the command line, use the --var option when running the venom run commands:

bash
$ venom run --var="foo=bar"
$ venom run --var='foo_list=["biz","buz"]'
$ venom run --var='foo={"biz":"bar","biz":"barr"}'

The --var option can be used many times in a single command.

Variable Definitions Files

To set a lot of variables, it is more convenient to specify their values in a variable definitions file. This file is a YAML dictionary. You have to specify that file on the command line with --var-from-file:

bash
venom run --var-from-file variables.yaml

Environment Variables

As a fallback for the other ways of defining variables, venom tool searches the environment of its own process for environment variables named VENOM_VAR_ followed by the name of a declared variable.

bash
$ export VENOM_VAR_foo=bar
$ venom run *.yml

You can also define the environment variable and run your testsuite in one line:

bash
$ VENOM_VAR_foo=bar venom run *.yml

Arguments

You can define arguments on the command line using the flag name.

Flags are listed in the result of help command.

List of available flags for venom run command:

…

Define arguments with environment variables

You can also define the arguments with environment variables:

bash
# is the same as
VENOM_FORMAT=json venom run my-test-suite.yml

# is equivalent to
venom run my-test-suite.yml --format=json

Flags and their equivalent with environment variables usage:

  • --format="json" flag is equivalent to VENOM_FORMAT="json" environment variable
  • --lib-dir="/etc/venom/lib:$HOME/venom.d/lib" flag is equivalent to VENOM_LIB_DIR="/etc/venom/lib" environment variable
  • --output-dir="test-results" flag is equivalent to VENOM_OUTPUT_DIR="test-results" environment variable
  • --stop-on-failure flag is equivalent to VENOM_STOP_ON_FAILURE=true environment variable
  • --var foo=bar flag is equivalent to VENOM_VAR_foo='bar' environment variable
  • --var-from-file fileA.yml fileB.yml flag is equivalent to VENOM_VAR_FROM_FILE="fileA.yml fileB.yml" environment variable
  • -v flag is equivalent to VENOM_VERBOSE=1 environment variable
  • -vv flag is equivalent to VENOM_VERBOSE=2 environment variable

It is possible to set NO_COLOR=1 environment variable to disable colors from output.

Use a configuration file

You can define the Venom settings using a configuration file .venomrc. This configuration file should be placed in the current directory or in the home directory.

yaml
variables: 
  - foo=bar
variables_files:
  - my_var_file.yaml
stop_on_failure: true
format: xml
output_dir: output
lib_dir: lib
verbosity: 3

Please note that the command line flags override the configuration file. The configuration file overrides the environment variables.

Concepts

TestSuites

A test suite is a collection of test cases that are intended to be used to test a software program to show that it has a specified set of behaviors. A test case is a specification of the inputs, execution conditions, testing procedure, and expected results that define a single test to be executed to achieve a particular software testing objective, such as to exercise a particular program path or to verify compliance with a specific requirement.

In venom the testcases are executed sequentially within a testsuite. Each testcase is an ordered set of steps. Each step is based on an executor that enables some specific kind of behavior.

In venom a testsuite is written in one YAML file respecting the following structure:

…

Executors

  • amqp: https://github.com/ovh/venom/tree/master/executors/amqp
  • couchbase: https://github.com/ovh/venom/tree/master/executors/couchbase
  • dbfixtures: https://github.com/ovh/venom/tree/master/executors/dbfixtures
  • exec: https://github.com/ovh/venom/tree/master/executors/exec exec is the default type for a step
  • grpc: https://github.com/ovh/venom/tree/master/executors/grpc
  • http: https://github.com/ovh/venom/tree/master/executors/http
  • imap: https://github.com/ovh/venom/tree/master/executors/imap
  • kafka https://github.com/ovh/venom/tree/master/executors/kafka
  • mqtt https://github.com/ovh/venom/tree/master/executors/mqtt
  • odbc: https://github.com/ovh/venom/tree/master/executors/plugins/odbc
  • ovhapi: https://github.com/ovh/venom/tree/master/executors/ovhapi
  • rabbitmq: https://github.com/ovh/venom/tree/master/executors/rabbitmq
  • readfile: https://github.com/ovh/venom/tree/master/executors/readfile
  • redis: https://github.com/ovh/venom/tree/master/executors/redis
  • smtp: https://github.com/ovh/venom/tree/master/executors/smtp
  • sql: https://github.com/ovh/venom/tree/master/executors/sql
  • ssh: https://github.com/ovh/venom/tree/master/executors/ssh
  • web: https://github.com/ovh/venom/tree/master/executors/web

User defined executors

You can define an executor with a single YAML file. This is a good way to abstract technical or functional behaviors and reuse them in complex testsuites.

Example:

file lib/customA.yml:

yaml
executor: hello
input:
  myarg: {}
steps:
- script: echo "{\"hello\":\"{{.input.myarg}}\"}"
  assertions:
  - result.code ShouldEqual 0
  vars:
    hello:
      from: result.systemoutjson.hello
    all:
      from: result.systemoutjson
output:
  display:
    hello: "{{.hello}}"
  all: "{{.all}}"

file testsuite.yml:

yaml
name: testsuite with a user executor
testcases:
- name: testA
  steps:
  - type: hello
    myarg: World
    assertions:
    - result.display.hello ShouldContainSubstring World
    - result.alljson.hello ShouldContainSubstring World

Notice the variable alljson. All variables declared in output are automatically converted into JSON format with the suffix json. In the example above, two implicit variables are available: displayjson.hello and alljson.

Venom will load user-defined executors from the directory lib/ relative to the testsuite path. You can add executor source paths using the flag --lib-dir. Note that all folders listed with --lib-dir will be scanned recursively to find .yml files as user executors.

The user defined executors work with templating, you can check the templating result in venom.log. In this file, if you see an error such as error converting YAML to JSON: yaml: line 14: found unexpected end of stream, you probably need to adjust indentation with the templating function indent.

Example:

yaml
name: testsuite with a user executor multilines
testcases:
- name: test
  steps:
  - type: multilines
    script: |
      # test multilines
      echo "5"
    assertions:
    - result.alljson ShouldEqual 5

using this executor:

yaml
executor: multilines
input:
  script: "echo 'fo

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goclicli-appcommandcommand-line

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category测试质量
PricingOpen source

> Related tools

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.