Skip to main content

Overview

Comprehensive testing ensures code quality and reliability across the Olis monorepo.

Running Tests

Test Types

Unit Tests

Test individual functions and components in isolation

Integration Tests

Test interactions between components and services

E2E Tests

Test complete user workflows from start to finish

API Tests

Test API endpoints and responses

Electron Client Testing

Unit Tests with Jest

E2E Tests with Playwright

API Server Testing

pytest Integration Tests

Best Practices

  • Small, focused functions
  • Avoid side effects
  • Use dependency injection
  • Mock external dependencies
  • Aim for 80%+ coverage
  • Focus on critical paths
  • Don’t test implementation details
  • Test behavior, not code
  • Mirror source structure
  • Group related tests
  • Clear test names
  • Arrange-Act-Assert pattern

Next Steps

Contributing

Learn how to contribute

Building

Build for production