- Unit Tests to test methods individually. They are written in the contract’s language and are executed locally.
- Integration Tests to test how your contract behaves in a realistic environment. You can write them in Rust or Typescript, and execute in a local Sandbox or the NEAR testnet.
Introduction
Learn about testing NEAR smart contracts, including unit tests, integration tests, and best practices for ensuring contract reliability and security.
While developing your smart contract you will want to test that it works as it is supposed to, and moreover, does so securely. In NEAR we have developed tools to help you carry out such tests.
Basically, there are two types of tests you can perform: