You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<ahref="https://gitpod.io/#https://github.com/ovh/venom"><imgsrc="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"alt="Contribute with Gitpod"/></a>
10
10
11
-
# Table of content
11
+
# Table of contents
12
12
13
13
-[🐍 Venom](#-venom)
14
-
-[Table of content](#table-of-content)
14
+
-[Table of contents](#table-of-contents)
15
15
-[Overview](#overview)
16
16
-[Installing](#installing)
17
17
-[Install from binaries](#install-from-binaries)
@@ -61,10 +61,10 @@ Venom is a CLI (Command Line Interface) that aims to create, manage and run your
61
61
# Overview
62
62
63
63
Venom allows you to handle integration tests the same way you code your application.
64
-
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, write and execute testsuites become easier for developers and teams.
64
+
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.
65
65
66
-
Concretely, you have to write testsuite in a YAML file.
67
-
Venom run executors (scripts, HTTP Request, web, IMAP, etc.) and apply assertions.
66
+
Concretely, you have to write a testsuite in a YAML file.
@@ -73,7 +73,7 @@ It can also generate xUnit result files.
73
73
74
74
## Install from binaries
75
75
76
-
You can find latest binary release from: https://github.com/ovh/venom/releases/latest/.
76
+
You can find the latest binary release at: https://github.com/ovh/venom/releases/latest/.
77
77
78
78
Example for Linux:
79
79
@@ -107,7 +107,7 @@ Version venom: v1.2.0
107
107
108
108
# Docker image
109
109
110
-
Instead of installing (and updating) Venom locally, Venom can be started as a Docker image with following commands.
110
+
Instead of installing (and updating) Venom locally, Venom can be started as a Docker image with the following commands.
111
111
112
112
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.
113
113
@@ -292,7 +292,7 @@ lib_dir: lib
292
292
verbosity: 3
293
293
```
294
294
295
-
Please note that the command line flags overrides the configuration file. The configuration file overrides the environment variables.
295
+
Please note that the command line flags override the configuration file. The configuration file overrides the environment variables.
296
296
297
297
298
298
# Concepts
@@ -302,7 +302,7 @@ Please note that the command line flags overrides the configuration file. The co
302
302
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.
303
303
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.
304
304
305
-
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 enable some specific kind of behavior.
305
+
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.
306
306
307
307
In `venom` a testsuite is written in one `YAML` file respecting the following structure:
308
308
@@ -414,12 +414,12 @@ testcases:
414
414
- result.alljson.hello ShouldContainSubstring World
415
415
```
416
416
417
-
Notice the variable `alljson`. All variables declared in output are automatically converted in a json format with the suffix `json`. In the example above, two implicit variables are available: `displayjson.hello`and `alljson`.
417
+
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`.
418
418
419
-
Venom will load user's executors from the directory `lib/` relative to the testsuite path. You add executors source path using the flag `--lib-dir`.
419
+
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`.
420
420
Note that all folders listed with `--lib-dir` will be scanned recursively to find `.yml` files as user executors.
421
421
422
-
The user defined executors work with templating, you can check the templating result in `venom.log`. In this file, if you see an error 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`.
422
+
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`.
423
423
424
424
Example:
425
425
@@ -552,7 +552,7 @@ More examples are available [here](https://github.com/ovh/venom/tree/master/vari
552
552
To be able to reuse a property from a teststep in a following testcase or step, you have to extract the variable, as the following example.
553
553
554
554
After the first step execution, `venom` extracts a value using a regular expression `foo with a ([a-z]+) here` from the content of the `result.systemout` property returned by the `executor`.
555
-
Then this variable can be reused in another test, with the name `testA.myvariable` with `testA` corresponding to the name of the testcase. A default value could also be supplied if the variable can't be extracted from the output, which can commonly happen when parsing json output.
555
+
Then this variable can be reused in another test, with the name `testA.myvariable` with `testA` corresponding to the name of the testcase. A default value could also be supplied if the variable can't be extracted from the output, which can commonly happen when parsing JSON output.
556
556
557
557
```yaml
558
558
name: MyTestSuite
@@ -715,7 +715,7 @@ You may also include additional steps like a regular user defined executor.
715
715
User assertions are executed in an entirely clean context, containing only the following variables:
716
716
- `a`: the left operand
717
717
- `b`: the (first) right operand
718
-
- `argv`: the rights operands
718
+
- `argv`: the right operands
719
719
720
720
If you need to be compatible with the `input` syntax of user defined executors, you could use the `argv` as the default value and access these through the regular `input.*` syntax.
721
721
```yaml
@@ -816,7 +816,7 @@ $ venom run --format=xml --output-dir="."
816
816
$ venom run --output-dir="." --html-report
817
817
```
818
818
819
-
Reports exported in XML can be visualized with a xUnit/jUnit Viewer, directly in your favorite CI/CD stack for example in order to see results run after run.
819
+
Reports exported in XML can be visualized with an xUnit/jUnit Viewer, directly in your favorite CI/CD stack for example in order to see results run after run.
820
820
821
821
# Advanced usage
822
822
@@ -846,7 +846,7 @@ testcases:
846
846
- script: cat exec/testa.json
847
847
info: "the value of result.systemoutjson is {{.result.systemoutjson}}"
848
848
assertions:
849
-
- result.systemoutjson.foo ShouldContainSubstrin bar
849
+
- result.systemoutjson.foo ShouldContainSubstring bar
850
850
```
851
851
852
852
```bash
@@ -933,7 +933,7 @@ testcases:
933
933
934
934
It is possible to iterate over data using `range` attribute.
935
935
936
-
The following data types are supported, each exposing contexted variables `.index`, `.key` and `.value`:
936
+
The following data types are supported, each exposing contextual variables `.index`, `.key` and `.value`:
937
937
938
938
- An array where each value will be iterated over (`[]interface{}`)
939
939
- `.index`/`.key`: current iteration index
@@ -1074,7 +1074,7 @@ Our awesome contributors:
1074
1074
1075
1075
# License
1076
1076
1077
-
Copyright 2022 OVH SAS
1077
+
Copyright 2026 OVH SAS
1078
1078
1079
1079
Licensed under the Apache License, Version 2.0 (the "License");
1080
1080
you may not use this file except in compliance with the License.
0 commit comments