Support test scenarios from configuration files
Clarification and motivation
While it can still improve, currently cleveland
is a fairly mature framework for testing on Tezos.
However, one of its major drawbacks for adoption from new users is that it's an Haskell eDSL.
To be clear: this isn't a downside in itself, at all, as it allows us to use common Haskell testing libraries, best practices, advanced cases, detailed configs, etc.
For someone that's unfamiliar with Haskell, however, this is all very daunting, especially too much so for making some simple and common tests.
This fact limits greatly the amount of people that can (or choose) to use cleveland
, but this could be changed.
I propose to add the ability to define test scenario in configuration files, perhaps using YAML, that can be fed to the cleveland library to be executed.
Note: this is likely to be a pretty big issue overall and it's kept vague on purpose. Most likely it should be split into sub-issues and the scope should be limited, I suggest to start by adding support for unit tests only.
Acceptance criteria
- there is a syntax that allows creating test scenarios in configuration files (e.g. in YAML)
- multiple unit tests can be specified in the same config file
- for each test it's possible to specify some base options (e.g. moneybag, emulated or on network, etc.)
- one or more contracts can be imported in each test from
.tz
source code - each test can be comprised of a series of steps (transfers, calls, originations) and simple condition checks
- the
cleveland
library is able to run scenarios from one such configuration file