tests/test_qa_agent.py: Tests de lógica RAG (mockear LLM).
3. Guías de Mocking
Ollama/LLM: SIEMPRE mockear en tests unitarios. Usa mock_ollama fixture.
ChromaDB: Mockear para unitarios, usar instance real en tmp_path para integración.
File System: Usa tmp_path fixture de pytest.
4. Cobertura
El objetivo es >80% en módulos core.
uv run pytest tests/ --cov=obsidianrag
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: vasallo94-obsidianrag-testing-qa3description: Testing & QA4---56# Testing & QA78## Cuándo usar esta skill9- Cuando escribas código nuevo y necesites verificarlo.10- Cuando reportes o arregles bugs.11- Para asegurar la calidad antes de una release.1213## Cómo usar esta skill1415### 1. Ejecutar Tests16```bash17cd backend18uv run pytest tests/ -v19# Solo integración20uv run pytest tests/ -m "integration"21```2223### 2. Estructura de Tests24- `tests/conftest.py`: Fixtures compartidas (mock_vault, mock_settings).25- `tests/test_server.py`: Tests de API FastAPI.26- `tests/test_qa_agent.py`: Tests de lógica RAG (mockear LLM).2728### 3. Guías de Mocking29- **Ollama/LLM**: SIEMPRE mockear en tests unitarios. Usa `mock_ollama` fixture.30- **ChromaDB**: Mockear para unitarios, usar instance real en `tmp_path` para integración.31- **File System**: Usa `tmp_path` fixture de pytest.3233### 4. Cobertura34El objetivo es >80% en módulos core.35```bash36uv run pytest tests/ --cov=obsidianrag37```3839---40> Converted and distributed by [TomeVault](https://tomevault.io/claim/vasallo94) — claim your Tome and manage your conversions.41<!-- tomevault:4.0:skill_md:2026-04-11 -->
Run npx skillmds@latest add tomevault-io/vasallo94-obsidianrag-testing-qa in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Testing & QA It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.