[FEATURE]: Add Automated Testing Suite (pytest) and CI for the Backend

Aperta
#163 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@Nensi177 ci sta già lavorando.

Dal 3/10/2026.

  • #164 di @Nensi177 — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
fastapi, github-actions, python
Ambito
backend, ci-cd, testing

Direzione di ricerca

Start by reviewing the backend structure and BestPracticesChecklist.md, especially the test_invocation and test_most requirements. Identify the LangGraph nodes, LLM processing, scraper, utility, and FastAPI route areas to cover, then define how Groq, Pinecone, and SentenceTransformer/Hugging Face are isolated. Done means a pytest suite and GitHub Actions workflow provide deterministic backend regression coverage without changing production behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Feature and its Use Cases

What is the feature?

Introduce a dedicated pytest-based automated testing suite for the Perspective backend, along with a GitHub Actions CI workflow to automatically run the tests on relevant pull requests.

Why is it needed?

The backend contains LangGraph workflows, LLM processing, web scraping, FastAPI routes, and integrations with external services. Without automated tests, changes can introduce regressions that are difficult to detect through manual testing.

The test infrastructure will provide:
  • Automated regression coverage
  • Faster feedback during development
  • Consistent backend validation
  • Deterministic tests by isolating external dependencies
  • Automated testing through CI
  • Maintainable test foundation
The initial test suite should cover:
  • LangGraph node behavior and state handling
  • LLM processing with mocked external calls
  • Scraper behavior
  • Utility functions
  • FastAPI routes
  • Error and edge-case handling

External dependencies such as Groq, Pinecone, and SentenceTransformer/Hugging Face should be isolated where appropriate so tests do not depend on API availability, rate limits, or model downloads.

Expected Outcome
  • Dedicated backend pytest test suite
  • Automated backend test execution through GitHub Actions
  • External dependencies isolated from tests where appropriate
  • Regression coverage for core backend functionality
  • A foundation for progressively improving backend test coverage
Scope: This issue is limited to backend testing infrastructure and CI.

It does not modify the application's production behavior or introduce new user-facing functionality.

Additional Context

This feature directly supports the automated testing requirements outlined in BestPracticesChecklist.md : particularly 'test_invocation' and 'test_most'.

Image
Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Lingua principale
TypeScript
Stelle
58
Fork
90
Merge medio
11h 51m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AOSSIE-Org/Perspective

Tutte le issue di AOSSIE-Org/Perspective

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.