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,--profilingwere deleted. The flag-vwas added. You can use-vvor-vvvto increase verbose. - flag
--strictwas deleted. If there is a test failure, venom will always exit with code 2. - flag
--excludewas deleted. This can be easily replaced on command line with grep. Example:venom run $(ls *.yml|grep -v toexclude.yml). - flag
--parallelwas deleted. You can useparallelsoftware in remplacement of the flag. - flag
--no-check-variableswas deleted, venom will always check variables. - flag
--envwas deleted. You can use--varor--var-from-fileor.venomrcfile 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 anymoreFOO=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 SUCCESSCommand 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 0See 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.jsonTestcase 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:
amqp: https://github.com/ovh/venom/tree/master/executors/amqpmqtthttps://github.com/ovh/venom/tree/master/executors/mqttodbc. As this executor requiresunixodbcdriver, this is only available as plugin. doc aboutodbcexecutor: https://github.com/ovh/venom/tree/master/executors/plugins/odbc
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.
- See how to write an executor as plugin: https://github.com/ovh/venom/tree/master/executors/plugins
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 commandsContributors
Thanks to all the contributors for making writing and running integration tests so much easier!
New Contributors
- @fabriziomoscon made their first contribution in #289
- @marema31 made their first contribution in #297
- @christophe-dufour made their first contribution in #388
- @sixstone-qq made their first contribution in #393
- @manzan46 made their first contribution in #397
- @donotnoot made their first contribution in #403
- @chris1786 made their first contribution in #404
- @SimonT90poe made their first contribution in #401
- @maxstepanov made their first contribution in #414
- @Juneezee made their first contribution in #442
- @philippgille made their first contribution in #448
- @lowlighter made their first contribution in #452