In computer programming, unit testing is a software testing method in which the smallest testable parts of a program are individually and independently tested to determine whether they are fit to use.
When we find it appropriate and useful (i.e., most of the time), we write our own unit tests.
For EVM smart contracts written in Solidity, the following frameworks can be used to write unit tests:
- Brownie – Python-based development and testing framework;
- Foundry’s Forge – tests are written in Solidity.
There is no tooling yet for Solana programs like on Ethereum, which is why we started developing our own Solana testing framework, Trdelnik.