Overview
This guide covers strategies and tools for testing your ComputeNet integrations, from local development to testnet validation.
Planned Documentation
Testing tools and infrastructure are under development. This page outlines the planned testing approach.
Testing Environments
ComputeNet will provide multiple environments for testing:
Local Simulator
A local environment that simulates the ComputeNet network for rapid development and unit testing.
Devnet
A shared development network with relaxed parameters for integration testing.
Testnet
A production-like environment for final validation before mainnet deployment.
Local Testing
The local simulator allows testing without network access:
import { createSimulator } from '@computenet/testing';
// Create local simulator
const sim = await createSimulator({
validators: 3,
latency: 100 // ms
});
// Use like real client
const client = sim.createClient();
// Submit and verify locally
const job = await client.submit({ ... });
const result = await job.waitForCompletion();
// Assertions
expect(result.verified).toBe(true);
// Cleanup
await sim.stop();Test Fixtures
Pre-built fixtures for common testing scenarios:
- Sample WASM modules with known outputs
- Mock receipts for verification testing
- Error scenarios for failure handling
Best Practices
- Test with the local simulator for fast iteration
- Validate on devnet before testnet deployment
- Test verification failure scenarios explicitly
- Monitor gas usage and execution time
- Test timeout and retry handling