Integration Tests
Integration tests enable you to deploy a contract in the NEARΒ testnet
Β or a localΒ sandbox
and create test users to interact with it. This way, you can thoroughly test your contract in a realistic environment.
Moreover, when using the local sandbox
you gain complete control of the network:
- Create test
Accounts
and manipulate theirState
andBalance
. - Simulate errors on callbacks.
- Control the time-flow and fast-forward into the future (Rust ready, TS coming soon).
In NEAR, integration tests are implemented using a framework called Workspaces. Workspaces comes in two flavors: π¦ Rust and π Typescript.
All of our examples come with integration testing.
Sandbox Testing
NEAR Workspaces allows you to write tests once, and run them either on testnet
or a local Sandbox
. By default, Workspaces will start a sandbox and run your tests locally. Lets dive into the features of our framework and see how they can help you.
Create Accountsβ
Dev Accountβ
- π¦ Rust
- π JavaScript
Loading...
Loading...
Subaccountβ
- π¦ Rust
- π JavaScript
Loading...
Loading...
Using Secret Keyβ
- π¦ Rust