Specialized skill for testing nondominium Holochain applications with Tryorama, providing comprehensive test patterns, agent simulation workflows, performance testing, and multi-agent scenario testing. Use when writing Tryorama tests, debugging zome interactions, or validating Holochain DNA functionality.
Specialized skill for testing nondominium Holochain applications with Tryorama, providing comprehensive test patterns, agent simulation workflows, performance testing, and multi-agent scenario testing. Use when writing Tryorama tests, debugging zome interactions, or validating Holochain DNA functionality.
Nondominium Holochain Tryorama Testing
This skill transforms Claude into a specialized Tryorama testing assistant, providing expert guidance for testing Holochain applications with multi-agent scenarios, performance testing, and comprehensive validation workflows.
When to Use This Skill
Use this skill when:
Writing Tryorama tests for Holochain zomes
Creating multi-agent test scenarios
Testing cross-zome interactions and workflows
Validating ValueFlows economic flows
Performance testing and load testing
Debugging Holochain DNA functionality
Testing capability-based access control
Validating PPR (Private Permissioned Requests) systems
Do NOT use for:
DNA code development (use the DNA development skill)
Frontend/UI development (use appropriate web development skills)
Generic testing outside Holochain context
Core Testing Architecture
Test File Organization
Tests are organized by zome and functionality in a 4-layer testing strategy:
// vitest.config.tsexportdefaultdefineConfig({
test: {
timeout: 240000, // 4 minutes for complex scenariosconcurrency: 1, // Single fork for DHT consistencyglobals: true,
environment: "node",
},
});
Performance Benchmarks
exportconstPPR_PERFORMANCE_BENCHMARKS = {
BI_DIRECTIONAL_RECEIPT_CREATION: 1000, // msSIGNATURE_ROUND_TRIP: 200, // msREPUTATION_AGGREGATION: 1500, // msBULK_RECEIPT_PROCESSING: 5000, // ms for 100 receiptsCROSS_AGENT_VALIDATION: 800, // ms
};
Running Tests
Test Execution Commands
# Run all tests
bun run tests
# Run specific test files (use filename pattern, not path)
bun run tests person-foundation
bun run tests ppr-integration
bun run tests resource-scenarios
# Run specific zome tests (use partial file name patterns)
bun run tests person
bun run tests gouvernance
bun run tests ppr
Test Development Tips
Test Isolation: Use .only() on describe or it blocks to run specific tests during development:
describe.only('specific test suite', () => { ... }) // Run only this suite
it.only('specific test', async () => { ... }) // Run only this test
test.only('specific test', async () => { ... }) // Run only this test
Rust Debugging: Use the warn! macro in Rust zome functions to log debugging information that will appear in test output:
The warn! macro output is visible in the test console, making it invaluable for debugging complex Holochain interactions and understanding execution flow during test development.
Best Practices
DO ✅
Use structured test data generators for consistent test scenarios
Implement comprehensive validation helpers for complex data structures
Test both success and failure cases for all zome functions
Use performance benchmarks to catch regressions
Create multi-agent scenarios to test real-world usage
Implement proper test isolation and cleanup
Use descriptive test names and scenarios
Test cross-zome interactions thoroughly
Validate bi-directional receipt structures for PPR systems
Use stress testing for performance-critical components
DON'T ❌
Create tests without proper validation of results
Skip testing error cases and edge conditions
Use hardcoded test data that's hard to maintain
Create tests that depend on each other's state
Ignore performance testing for critical paths
Skip multi-agent testing for collaborative features
Test without proper timeout handling
Create tests that don't validate Holochain-specific patterns
Skip cryptographic validation testing
Ignore DHT consistency requirements in multi-agent tests
Resources
Test Utilities/
Shared testing helpers and utilities:
common.ts - Common test patterns and helpers
agents.ts - Agent management and setup utilities
fixtures.ts - Test data generators and fixtures
Test Scenarios/
Predefined test scenarios for common workflows:
ppr-scenarios.ts - PPR system test scenarios
multi-agent.ts - Multi-agent interaction patterns
performance.ts - Performance testing utilities
Note: This skill is specifically tailored for the nondominium project's Tryorama testing needs and should be used in conjunction with the DNA development skill for comprehensive Holochain application testing.