- Docs
- Developers
- Litmus
Litmus: comprehensive testing and benchmarking tool
The Litmus repository contains tools designed to streamline smart contract testing and performance benchmarking on the Archway blockchain. The project is split into two key components:
- archway-test-tube – an Archway-specific implementation of Osmosis' test-tube library.
- ecometer – a performance benchmarking wrapper built on top of archway-test-tube.
These tools provide developers with efficient ways to both test the correctness of their smart contracts and benchmark their performance over time, ensuring they are optimized for gas efficiency.
Archway test tube
archway-test-tube is a Rust-based implementation of the Osmosis test-tube library. It provides a lightweight and efficient wrapper for interacting with the Archway blockchain in your native Rust tests. Unlike spinning up a Docker container for testing purposes, archway-test-tube offers a faster and more streamlined approach.
Advantages over Multi-Test
- Real-Chain Testing: It allows developers to test their smart contracts as if they were on a real chain, offering deeper insights into the behavior of contracts on Archway.
- Archway-Specific Functionality: This includes support for Archway's reward distribution mechanisms, callbacks, and other native features, offering more comprehensive testing capabilities for projects built on Archway.
Check out some test cases on archway-test-tube.
Ecometer
ecometer is a performance benchmarking wrapper for archway-test-tube, providing a simplified API for developers looking to measure the gas efficiency of their smart contracts.
Key features
- Performance Testing: Unlike archway-test-tube, which focuses on correctness, ecometer is built to test the performance of smart contracts by running benchmarks.
- Gas Consumption Graphs: It outputs detailed graphs tracking gas consumption for each transaction, making it easy to identify areas where gas costs might increase over time or under certain conditions.
These types of benchmarks are especially useful for contracts where gas costs may rise due to state changes, growing data sets, or additional computation as criteria are met.