Contract Testing
Testing is vital to ensure that smart contracts are safe, resilient, and accurate.
Guides in this category:
📄 Unit Tests
Unit tests are small tests that test smart contracts.
📄 Mocking
Mocking dependency contracts in tests.
📄 Test Authorization
Write tests that test contract authorization.
📄 Test Events
Write tests that test contract events.
📄 Integration Tests
Integration testing uses dependency contracts instead of mocks.
📄 Fork Testing
Integration testing using mainnet data.
📄 Fuzzing
Fuzzing and property testing to find unexpected behavior.
📄 Differential Tests
Differential testing detects unintended changes.
📄 Differential Tests with Test Snapshots
Differential testing using automatic test snapshots.
📄 Mutation Testing
Mutation testing finds code not tested.
📄 Code Coverage
Code coverage tools find code not tested.
📄 Testing with Ledger Snapshot
Use ledger snapshots to test contracts with ledger data