-
Notifications
You must be signed in to change notification settings - Fork 0
TESTING.md
This document describes the testing strategy used throughout the CeloHT ecosystem.
Testing is essential to ensure that every release is secure, reliable, and production-ready.
CeloHT follows a test-first mindset.
Every new feature, bug fix, or improvement should be validated through automated and manual testing before being merged.
Our goals are:
- Reliability
- Security
- Stability
- Performance
- Maintainability
Manual Testing
▲
Integration Tests
▲
Unit Tests
Unit tests should represent the majority of all tests.
Unit tests verify individual functions and components.
Examples:
- Utility functions
- React components
- Smart contract methods
- API services
Example:
npm testIntegration tests verify that multiple components work correctly together.
Examples:
- Wallet connection
- Smart contract interaction
- Database communication
- API requests
E2E tests simulate real user behavior.
Examples:
- Connect wallet
- Register an agent
- Complete an education course
- Submit a governance vote
Recommended tools:
- Playwright
- Cypress
Every smart contract must include automated tests.
Example:
npx hardhat testTests should verify:
- Expected behavior
- Access control
- Edge cases
- Invalid inputs
- Security protections
Security testing includes:
- Static analysis
- Dependency scanning
- Secret detection
- Access control validation
- Smart contract vulnerability testing
Recommended tools:
- Slither
- Mythril
- OpenZeppelin Defender
- GitHub Advanced Security
Performance tests measure:
- API response time
- Page load time
- Database performance
- Smart contract gas usage
The CeloHT platform should follow accessibility best practices.
Areas to verify:
- Keyboard navigation
- Screen reader compatibility
- Color contrast
- Responsive layouts
- Form accessibility
Recommended minimum coverage:
| Area | Coverage |
|---|---|
| Utilities | 95% |
| Components | 90% |
| Services | 90% |
| Smart Contracts | 100% |
| API | 90% |
Run all tests
npm testRun coverage
npm run coverageRun smart contract tests
npx hardhat testRun E2E tests
npm run test:e2eEvery Pull Request automatically runs:
- Dependency installation
- Type checking
- Linting
- Unit tests
- Smart contract tests
- Build verification
- Security checks
A Pull Request cannot be merged if any required check fails.
Before every release verify:
- Wallet connection
- Navigation
- Responsive design
- Forms
- Documentation links
- Smart contract interactions
- Transaction confirmation
- Error handling
A good bug report should include:
- Environment
- Browser
- Operating System
- Steps to reproduce
- Expected behavior
- Actual behavior
- Screenshots (if applicable)
- Logs (if available)
- Write tests before fixing bugs.
- Keep tests independent.
- Avoid flaky tests.
- Test edge cases.
- Use meaningful test names.
- Maintain high code coverage.
- Review failing tests before merging.
Planned enhancements include:
- Visual regression testing
- Load testing
- Chaos engineering
- AI-assisted test generation
- Cross-browser automation
- Mobile device testing
- Continuous performance monitoring
Testing is a core part of the CeloHT development process.
Every contributor shares responsibility for delivering secure, reliable, and high-quality software that supports the project's mission of financial inclusion, education, and sustainable development.
© 2026 CeloHT - Open Source. Global Impact. Licensed under MIT.
Welcome to the official CeloHT documentation. This knowledge base provides comprehensive documentation for users, developers, contributors, partners, researchers, and ecosystem participants. Explore architecture, APIs, smart contracts, developer guides, governance, security, educational resources, roadmap, transparency reports, and community initiatives. Built with openness, collaboration, and long-term sustainability in mind, the CeloHT documentation follows international open-source documentation standards to make learning, building, and contributing accessible to everyone.