github ovh/venom v1.0.0
1.0.0

latest releases: v1.3.0, v1.3.0-beta.3, v1.3.0-beta.2...
4 years ago

Venom v1.0.0

Venom v1.0.0 is finally here!

What's new?

This release contains a lot of refactoring, bug fixes and new features since the release 0.28.0.

Full Changelog: v0.28.0...v1.0.0

Command line arguments

Simplification of the command line options:

  • flags --log, --profiling were deleted. The flag -v was added. You can use -vv or -vvv to increase verbose.
  • flag --strict was deleted. If there is a test failure, venom will always exit with code 2.
  • flag --exclude was deleted. This can be easily replaced on command line with grep. Example: venom run $(ls *.yml|grep -v toexclude.yml).
  • flag --parallel was deleted. You can use parallel software in remplacement of the flag.
  • flag --no-check-variables was deleted, venom will always check variables.
  • flag --env was deleted. You can use --var or --var-from-file or .venomrc file to declare variables with value from environment variables. See https://github.com/ovh/venom/tree/v1.0.0#environment-variables. Notice that you can't use anymore FOO=bar venom run ..., you have now to use: VENOM_VAR_FOO=bar venom run ...

Options can be set with environment variables: VENOM_FORMAT=json venom run *.yml is the same as venom run --format=json *.yml.
See Readme for other flags usage.

Sort Testsuite on venom run

There is no more automatic sorting on the testsuites when you run venom run.

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 testsuite files from with directory:

├── 01_a.yml
├── 02_b.yml
└── dira
    ├── 00_init.yml
    ├── 01_a.yml
    ├── 02_b.yml
    └── 02_c.yml

You can use find command to sort before running:

❯ venom run `find . -type f -name "*.yml"|sort`
 • TestSuite A root (./01_a.yml)
 	• TestCase-a-root SUCCESS
 • TestSuite B root (./02_b.yml)
 	• TestCase-b-root SUCCESS
 • TestSuite A (./dira/00_init.yml)
 	• Testcase-init SUCCESS
 • TestSuite A (./dira/01_a.yml)
 	• Testcase-a SUCCESS
 • TestSuite B (./dira/02_b.yml)
 	• Testcase-b SUCCESS
 • TestSuite B (./dira/02_c.yml)
 	• Testcase-c SUCCESS

Command line output

The output of venom command line was rewritten. It's much more readable with color and you can debug testsuite with a new keyword: info. See https://github.com/ovh/venom/tree/v1.0.0#debug-your-testsuites

Test variables

If you are using variables in your testsuite, it is recommended to declare them at the vars section of a testsuite. Then you have several options to set them. See https://github.com/ovh/venom/tree/v1.0.0#variables

Variable helpers

In this example, we will add simple quote around the .testA.myvariable.

- name: testB
  steps:
  - type: exec
    script: echo {{.testA.myvariable | squote}} > variable.with.simple.quote.txt
    assertions:
    - result.code ShouldEqual 0

See all variable helpers: https://github.com/ovh/venom/tree/v1.0.0#variable-helpers

Testsuite version

The version attribute in a testsuite was deleted. The version was used to control the basepath of the testsuite.
Venom now use as basepath the testsuite file, the same behaviour as version = "2" before.

This testsuite will read the file testa.json from the same directory as the testsuite itself.

name: Testsuite Read File
testcases:
- name: Testcase Read File
  steps:
  - type: readfile
    path: testa.json

Testcase name

If you have to write a reference to a testcase property, note that at runtime the testcase name is handled as a slug with uppercase support.

Skip testcase

It is possible to skip testcase according to some assertions. See https://github.com/ovh/venom/tree/v1.0.0#skip-testcase

Executors

New executors:

There is now three ways to write a venom executor: builtin, plugin or user-defined.

Plugin

Venom can now use .so plugin, the counterpart for using plugin is that you have to compile venom yourself.
.so files are not in the venom release.

User-defined executors

You can define reusable testcase as executor, and call it from your testsuite files.
Doc: https://github.com/ovh/venom/tree/v1.0.0#user-defined-executors

Compile, Test

A makefile is now available to build, test, etc.

$ make build
$ make plugins
$ make help # display all make commands

Contributors

Thanks to all the contributors for making writing and running integration tests so much easier!

New Contributors

Don't miss a new venom release

NewReleases is sending notifications on new releases.