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.
Copy file name to clipboardExpand all lines: executors/dbfixtures/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,11 +20,11 @@ In your yaml file, you declare your step like this
20
20
- folder optional
21
21
```
22
22
23
-
- `schemas` is a list of paths to several `.sql` file that contains the schemas of the tables in your database. If specified, the content of every file will be executed before loading the fixtures.
23
+
- `schemas` is a list of paths to several `.sql` files that contain the schemas of the tables in your database. If specified, the content of every file will be executed before loading the fixtures.
24
24
- `files`parameter is only used as a fallback if `folder` is not used.
25
-
- `migrations`is a folder path that contains SQL migrations files that can be used to initialize the database, instead of a list of schemas. **Note that if `schemas` is not empty, it will have precedence and migrations files will be ignored.**
25
+
- `migrations`is a folder path that contains SQL migration files that can be used to initialize the database, instead of a list of schemas. **Note that if `schemas` is not empty, it will have precedence and migration files will be ignored.**
26
26
- `migrationsTable`is the table used to store the migration version.
27
-
- `skipResetSequences`is only used for PostgreSQL database, it control whether index should be reset (default) or not
27
+
- `skipResetSequences`is only used for PostgreSQL databases, it controls whether the index should be reset (default) or not
Copy file name to clipboardExpand all lines: executors/grpc/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Venom - Executor Grpc
2
2
3
-
Step for execute GRPC Request
3
+
Step to execute a gRPC request
4
4
5
5
Based on `grpcurl`, see [grpcurl](https://github.com/fullstorydev/grpcurl) for more information.
6
6
This executor relies on the gRPC server reflection, which should be enabled on the server as described
@@ -11,7 +11,7 @@ gRPC server reflection also does not properly work with `gogo/protobuf`: grpc/gr
11
11
12
12
## Tests
13
13
14
-
Results of test are parsed as json and saved in `systemoutjson`. Status codes correspond
14
+
Results of tests are parsed as JSON and saved in `systemoutjson`. Status codes correspond
15
15
to the official status codes of gRPC.
16
16
You can find what individual return codes mean [here](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md).
17
17
@@ -23,14 +23,14 @@ In your yaml file, you can use:
23
23
- url mandatory
24
24
- service mandatory: service to call
25
25
- method mandatory: list, describe, or method of the endpoint
26
-
- data optional: data to marshal to json and send as a request
26
+
- data optional: data to marshal to JSON and send as a request
27
27
- headers optional: data to send as additional headers
28
28
- connect_timeout optional: The maximum time, in seconds, to wait for connection to be established. Defaults to 10 seconds
29
29
- default_fields optional: whether json formatter should emit default fields
30
30
- include_text_separator optional: when protobuf string formatter is invoked to format multiple messages, all messages after the first one will be prefixed with character (0x1E)
31
-
- tls_client_cert optional: a chain of certificates to identify the caller, first certificate in the chain is considered as the leaf, followed by intermediates. Setting it enable mutual TLS authentication. Set the PEM content or the path to the PEM file.
31
+
- tls_client_cert optional: a chain of certificates to identify the caller, first certificate in the chain is considered as the leaf, followed by intermediates. Setting it enables mutual TLS authentication. Set the PEM content or the path to the PEM file.
32
32
- tls_client_key optional: private key corresponding to the certificate. Set the PEM content or the path to the PEM file.
33
-
- tls_root_ca optional: defines additional root CAs to perform the call. can contains multiple CAs concatenated together. Set the PEM content or the path to the PEM file.
33
+
- tls_root_ca optional: defines additional root CAs to perform the call. Can contain multiple CAs concatenated together. Set the PEM content or the path to the PEM file.
34
34
- ignore_verify_ssl optional: set to true if you use a self-signed SSL on remote for example
Copy file name to clipboardExpand all lines: executors/http/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Venom - Executor HTTP
2
2
3
-
Step for execute a HTTP Request
3
+
Step to execute an HTTP request
4
4
5
5
## Input
6
6
In your yaml file, you can use:
@@ -23,9 +23,9 @@ In your yaml file, you can use:
23
23
- no_follow_redirect (optional): indicates that you don't want to follow Location if server returns a Redirect (301/302/...)
24
24
- skip_body: skip the body and bodyjson result
25
25
- skip_headers: skip the headers result
26
-
- tls_client_cert (optional): a chain of certificates to identify the caller, first certificate in the chain is considered as the leaf, followed by intermediates. Setting it enable mutual TLS authentication. Set the PEM content or the path to the PEM file.
26
+
- tls_client_cert (optional): a chain of certificates to identify the caller, first certificate in the chain is considered as the leaf, followed by intermediates. Setting it enables mutual TLS authentication. Set the PEM content or the path to the PEM file.
27
27
- tls_client_key (optional): private key corresponding to the certificate. Set the PEM content or the path to the PEM file.
28
-
- tls_root_ca (optional): defines additional root CAs to perform the call. Can contains multiple CAs concatenated together Set the PEM content or the path to the PEM file.
28
+
- tls_root_ca (optional): defines additional root CAs to perform the call. Can contain multiple CAs concatenated together. Set the PEM content or the path to the PEM file.
29
29
30
30
```
31
31
@@ -140,11 +140,11 @@ result.err
140
140
JSON keys are lowercased automatically (eg. use `result.bodyjson.yourkey`, not
141
141
`result.bodyjson.YourKey`).
142
142
143
-
On top of that, if a JSON key contains special characters, they will be translate to underscores.
143
+
On top of that, if a JSON key contains special characters, they will be translated to underscores.
144
144
145
145
### JSON arrays
146
146
147
-
When a HTTP response contains a JSON array, you have to use following syntax
147
+
When an HTTP response contains a JSON array, you have to use the following syntax
148
148
to access specific key of an array: `result.bodyjson.array_name.array_name_index_in_array.key`
149
149
150
150
Example if you want to get value of `path` key of *second* element in `apis` array: `result.bodyjson.apis.apis1.path`
0 commit comments