avocado-framework / avocado

Avocado is a set of tools and libraries to help with automated testing. One can call it a test framework with benefits. Native tests are written in Python and they follow the unittest pattern, but any executable can serve as a test.
https://avocado-framework.github.io/
Other
336 stars 335 forks source link

Runnable recipe: introduce validation and resolver #5897

Closed clebergnu closed 2 months ago

clebergnu commented 3 months ago

The concepts of recipes were pretty much internal to Avocado. Now, there are use cases for relying on them as a data file format. For this reason, let's introduce a validation of the current JSON file format. In the future, we may evaluate whether it needs to be further specialized, like adding signatures/magic numbers, specific file extensions, etc.

This also introduces a resolver implementation. With the validation introduced here, runnable recipes (JSON files) that are well formed and contain the right data, will be turned into internal runnables that can be listed with avocado list and run with avocado run.