Skip to content

Commit cb1a6fa

Browse files
committed
test: add intent extraction test suite with 39 scenarios
Add comprehensive test suite for LLM intent extraction covering all 9 use cases, GPU/model extraction, priority enforcement, user counts, conversation history, and UI button strings. Tests require Ollama and are run explicitly via `make test-intent`. Two smoke tests run as part of `make test-integration`. Assisted-by: Claude <noreply@anthropic.com> Signed-off-by: Andre Fredette <afredette@redhat.com>
1 parent 21266be commit cb1a6fa

12 files changed

Lines changed: 704 additions & 6 deletions

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ test: test-unit test-db test-integration ## Run all tests (requires DB and Ollam
530530

531531
test-unit: ## Run unit tests (no DB or Ollama required)
532532
@printf "$(BLUE)Running unit tests...$(NC)\n"
533-
cd $(SRC_DIR) && uv run pytest ../tests/ -v -m "not database and not integration"
533+
cd $(SRC_DIR) && uv run pytest ../tests/ -v -m "not database and not integration and not intent_extraction"
534534

535535
test-db: ## Run database tests (requires PostgreSQL with benchmark data)
536536
@printf "$(BLUE)Running database tests...$(NC)\n"
@@ -540,6 +540,10 @@ test-integration: setup-ollama ## Run integration tests (requires Ollama and DB)
540540
@printf "$(BLUE)Running integration tests...$(NC)\n"
541541
cd $(SRC_DIR) && uv run pytest ../tests/ -v -m integration
542542

543+
test-intent: setup-ollama ## Run intent extraction tests (requires Ollama)
544+
@printf "$(BLUE)Running intent extraction tests...$(NC)\n"
545+
cd $(SRC_DIR) && uv run pytest ../tests/ -v -m intent_extraction
546+
543547
##@ Code Quality
544548

545549
lint: ## Run linters

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ asyncio_default_fixture_loop_scope = "session"
143143
markers = [
144144
"database: marks tests that require a running PostgreSQL database with benchmark data",
145145
"integration: marks tests as integration tests (requires Ollama and database)",
146+
"intent_extraction: marks tests that validate LLM intent extraction (requires Ollama, run with make test-intent)",
146147
"unit: marks tests as unit tests (no external dependencies)",
147148
]
148149

0 commit comments

Comments
 (0)