Please describe your proposed solution
The introduction of Aiken and other tooling has provided the Cardano ecosystem with a mechanism to easily develop and evaluate validators in an isolated way. Complementary to that, a comprehensive framework for dApp testing should allow devs to model and evaluate complex sequences of transactions for happy-paths, edge-cases and any other required scenario.
There's no available tooling in Cardano to solve this concern in a simple, ergonomic and efficient way. Existing solutions are resource intensive and require complex setup and cleanup mechanisms. In other ecosystems, like Ethereum, it's common to use "devnets". A devnet is general term used to describe a short-lived, small-scale network (just one node) that is used during development.
Our solution to this problem in Cardano is to build a tool for defining, running and evaluating Cardano devnets. Our proposed tool includes the following features:
- A declarative language to define the test scenario. This will include an initial ledger state, a sequence of transactions to be executed from that initial state and the expected final state.
- A runtime engine build on top of Dolos that will interpret the test scenario and execute the corresponding transactions in a deterministic fashion. This engine will have very low-resource requirements (similar to Dolos)
- A reporting component that evaluates the final state of the ledger after the execution and compares it to the declared state.
- A log / tracing gathering mechanism that provides a fine-grained level of detail of all the events occurred throughout the execution.
- A quality-of-life utility to create test scenarios from existing network (mainnet, preprod, preview) allowing devs to "fork" the ledger from the selected network so that test scenarios can be ran from real-world examples.