89.0 Shrek

The Avocado team is proud to present another release: Avocado 89.0, AKA “Shrek”, is now available!

Release documentation: Avocado 89.0

Important Announcement

The Avocado team is planning to switch the default runner, from the implementation most people currently use (internally simply called runner), to the newer architecture and implementation called nrunner. This may happen as soon as version 90.0 (the next release).

Users installing and relying on the latest Avocado release will be impacted by this change and should plan accordingly.

To keep using the current (soon to be legacy) runner, you must set the --test-runner=runner command line option (or the equivalent test_runner configuration option, under section [run]).

Known issues are being tracked on our GitHub project page, with the nrunner tag, and new issue reports are appreciated.

Tip

To select the nrunner on this release (89.0 and earlier), run avocado run --test-runner=nrunner.

Users/Test Writers

  • A new asset requirement type has been introduced, allowing users to declare any asset obtainable with avocado.utils.asset to be downloaded, cached and thus be available to tests.

  • --dry-run is now supported for the nrunner.

  • The man page has been thoroughly updated and put in sync with the current avocado command features and options.

  • Avocado can now run from Python eggs. It’s expected that official egg builds will be made available starting with Avocado 90.0. Avocado is planning to use eggs as an automatic and transparent deployment mechanism for environments such as containers and VMs.

  • The datadir.paths.logs_dir and datadir.paths.data_dir are set to more consistent and predictable values, and won’t rely anymore on dynamic probes for “suitable” directories.

Bug Fixes

  • The nrunner now properly sets all test status status to the suite summary, making sure that errors are communicated to the end user through, among other means, the avocado execution exit code.

  • When running tests in parallel, multiple downloads of the same image (when using avocado.utils.vmimage) is now prevented by a better (early) locking.

  • A condition in which tests running in parallel could collide over the existence of the asset’s cache directory (created by other running tests) is now fixed.

Utility APIs

Internal Changes

  • avocado.core.plugin_interfaces.Discoverer is a new type of plugin interface that has been introduced to allow tests to be discovered without the need of references.

  • Avocado now uses time.monotonic() pretty much everywhere it’s possible. This time function will survive clock updates, and will never go back.

  • The safeloader, the Avocado component that looks for avocado-instrumented and python-unittest tests without executing possibly untrusted code, has seen a big refactor in this release, with an extended test coverage too.

  • The avocado-runner-requirement-package will now check for a package before installing it. This is an optimization and reduces the chance of multiple instances attempting to install packages at the same time.

  • Improvements to the handling and saving of messages generated by the nrunner.

  • The nrunner received some prep work for supporting variants. Jobs using the nrunner can now see the variants being applied to test suites, but be aware that the parameters on variants are still not passed to the tests.

  • The requirement runnables now have access to their “parent” configuration.

Misc Changes

  • The documentation has been update and gives more precise instructions for the set up of development environments.

  • Major changes to the CI, in a trend towards using more GH Actions based jobs.

For more information, please check out the complete Avocado changelog.