Skip to content

v1.0.0-rc.7

Compare
Choose a tag to compare
@fsamin fsamin released this 23 Aug 10:41
· 147 commits to master since this release
961aa8f

v1.0.0-rc.7

What's new?

This is a pre-release of venom 1.0.0. This release contains a lot of refactoring, bug fixes and new features since the release 0.28.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#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.

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#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#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#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#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#user-defined-executors

Compile, Test

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

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

Changelog

Features

Bug Fixes

Refactoring

1.0.0-beta.1 (2020-11-26)

1.0.0-beta.2 (2020-11-30)

1.0.0-beta.3 (2021-01-08)

1.0.0-beta.4 (2021-01-08)

1.0.0-rc.1 (2021-01-18)

1.0.0-rc.2 (2021-02-10)

1.0.0-rc.3 (2021-03-08)

1.0.0-rc.4 (2021-03-23)

1.0.0-rc.5 (2021-07-06)

1.0.0-rc.6 (2021-07-07)

1.0.0-rc.7 (2021-08-23)