pocket-ic-harness
A test harness for Internet Computer canisters using PocketIC.
Overview
pocket-ic-harness provides reusable utilities for integration testing IC canisters with PocketIC:
Canistertrait - define your canisters and their WASM pathsCanisterSetuptrait - define how canisters are installed before each testPocketIcTestEnv<S>- generic test environment with canister installation and registryPocketIcClient- typed query/update calls with Candid encodinginit_new_agent()- create IC agents against PocketIC endpoints#[pocket_ic_harness::test]- proc-macro for automatic setup/teardown
Quick Start
Define your canisters and setup:
use Path;
use Encode;
use ;
;
Write tests with the proc-macro — canisters are already installed:
async
Get Started
Add to your Cargo.toml:
[]
= "0.1"
License
Licensed under the MIT license. See LICENSE for details.