Documentation Index
Fetch the complete documentation index at: https://docs.knowledgestack.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Knowledge Stack maintains a comprehensive test suite to ensure reliability across all features. This page describes the testing approach, which is useful if you are contributing to the project, running your own tests, or evaluating the platform’s quality guarantees.Test Coverage
Knowledge Stack uses two levels of automated testing:Integration Tests
Integration tests verify individual features and API endpoints in isolation. Each test runs against a real PostgreSQL database (automatically provisioned) and is fully rolled back after execution, ensuring tests do not interfere with each other. Coverage includes:- All API endpoints (success cases, error cases, authorization)
- Database operations and constraints
- Business logic and validation rules
- External service interactions (recorded and replayed for consistency)
End-to-End Tests
End-to-end tests validate complete user workflows against a fully running Knowledge Stack instance. These tests use the generated SDK to interact with the API, simulating real client behavior. Coverage includes:- Full document lifecycle (upload, ingestion, retrieval)
- User authentication and tenant management
- Folder and document navigation
- Search and content retrieval
Running Tests
If you are working with the Knowledge Stack codebase, you can run the full test suite:Integration Tests
End-to-End Tests
Code Quality Checks
Test Quality Standards
Every feature in Knowledge Stack follows these testing requirements:- Retrieval operations: Tested for both “found” and “not found” cases
- Creation operations: Tested for success, constraint violations, and required vs. optional fields
- Update operations: Tested for success, not found, and validation errors
- Deletion operations: Tested for success and not found
- Authorization: Tested for both permitted and forbidden users where applicable
External Service Recording
Tests that interact with external services (such as LLM providers) use recorded HTTP interactions for deterministic replay. This means:- Tests produce the same results every time, regardless of network conditions
- No external API keys are needed to run the test suite
- Sensitive data (API keys, tokens) is automatically redacted from recordings
