Skip to content

[Feature] Improve test coverage and strategy #23

@AmanatAliPanhwer

Description

@AmanatAliPanhwer

🌟 Summary

Expand the test suite to cover more of the application's functionality and improve the overall testing strategy.

🧩 Problem or Motivation

The current test suite is a good start but has gaps in coverage. Key areas like authentication, video processing, and error handling are not fully tested.

🧰 Proposed Solution

  • Unit Tests: Add unit tests for business logic in app.py and worker.py that does not require a full browser.
  • Integration Tests: Add tests that verify the interaction between the Flask application and Supabase.
  • Test Database Setup: Implement a dedicated test database setup (e.g., using an in-memory SQLite for unit/integration tests or a separate Supabase project for E2E) to ensure tests are isolated and do not affect the development or production environment.
  • End-to-End (E2E) Tests:
    • Expand Playwright tests to cover user flows for authentication (login/logout).
    • Add tests for the video upload and processing flow (this may require mocking the external FFMPEG service).
    • Test edge cases and error conditions.
  • Test Coverage: Configure pytest-cov to measure test coverage and set a target for improvement.
  • CI: Ensure all tests are run automatically in the CI pipeline.

📦 Technical Considerations

  • Frontend changes (HTML/JS/CSS)
  • Backend changes (Flask, Supabase)
  • Database changes
  • Authentication/Authorization
  • UI/UX improvements

🧠 Alternatives

N/A

🧾 Additional Context

A more robust test suite will increase confidence in code changes and reduce the risk of regressions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions