Skip to content

03.5 Testing

sunithvs edited this page Feb 23, 2025 · 1 revision

Testing Documentation

Test Structure

The devb.io application uses pytest for testing, with tests organized within module directories.

Test Locations

  1. Module Tests
    • Location: modules/tests/
    • Purpose: Tests for specific module functionality
    • Includes unit tests for:
      • LinkedIn Fetcher
      • GitHub Contributions Fetcher
      • GitHub Project Ranker

Test Types

  1. Unit Tests

    • Test individual components in isolation
    • Mock external dependencies
    • Focus on specific functionality
  2. Integration Tests

    • Test interaction between components
    • Verify API endpoints
    • Test data flow

Running Tests

Tests can be run using pytest:

pytest modules/tests/

Test Configuration

  • Tests use environment variables for configuration
  • Mock data is provided where necessary
  • Fixtures are used for common test setup

Clone this wiki locally