~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
refactor(tests): consolidate live-service tests into tests/performance/ (#3538)
LearningCircuit0a49fddd2960
diff --git a/tests/performance/README.md b/tests/performance/README.mdindex c0375a8391..d28f5bdc13 100644--- a/tests/performance/README.md+++ b/tests/performance/README.md@@ -13,10 +13,17 @@ tests/performance/├── _shared/ — general pipeline harnesses, not tied to one subsystem│ ├── run_full_search.py — thin CLI around quick_summary(); --engine / --model flags│ └── build_eval_dataset.py — cross-product runner (query × engine × model) over run_full_search.py-└── relevance_filter/ — subsystem: LLM-as-judge relevance filter- ├── test_live.py — pytest live arXiv + Ollama test (integration + requires_llm + slow)- ├── eval_prompt.py — human-judgment harness: vary prompt, same judge, same arXiv- └── eval_models.py — human-judgment harness: vary judge, same prompt, same arXiv+├── relevance_filter/ — LLM-as-judge relevance filter (live arXiv + Ollama)+│ ├── test_live.py — pytest live arXiv + Ollama test (integration + requires_llm + slow)+│ ├── eval_prompt.py — human-judgment harness: vary prompt, same judge, same arXiv+│ └── eval_models.py — human-judgment harness: vary judge, same prompt, same arXiv+├── strategies/ — decomposition / iterative-reasoning strategies (live LLM + meta_search)+│ └── compare_strategies_visual.py — human-judgment harness: cross-strategy timeline plots+├── content_fetcher/ — HTML extraction quality across 200+ real URLs (live network)+├── search_engines/ — new-adapter integration against live APIs (Open Library, Zenodo, etc.)+├── mcp/ — MCP client concurrency (real subprocess echo server)+├── database/ — encrypted-DB backwards-compat (installs previous PyPI release)+└── api_auth/ — authenticated research API validation (requires running server + Puppeteer)```**When you add performance tests / harnesses for a new subsystem** (e.g.diff --git a/tests/performance/api_auth/__init__.py b/tests/performance/api_auth/__init__.pynew file mode 100644index 0000000000..e69de29bb2diff --git a/tests/performance/api_auth/conftest.py b/tests/performance/api_auth/conftest.pynew file mode 100644index 0000000000..e07064d5bb--- /dev/null+++ b/tests/performance/api_auth/conftest.py@@ -0,0 +1,98 @@+"""+Pytest configuration and shared fixtures for API tests+"""++import json+import subprocess+import uuid+import pytest+import requests+from pathlib import Path+import tempfile+import os++# Base URL for tests+BASE_URL = os.environ.get("LDR_TEST_BASE_URL", "http://127.0.0.1:5000")+# Use UUID for unique usernames to avoid collisions in parallel tests+TEST_USERNAME = f"testuser_{uuid.uuid4().hex[:12]}"+TEST_PASSWORD = "TestPass123"+++class AuthHelper:+ """Helper class to handle Puppeteer authentication"""++ @staticmethod+ def get_auth_cookies():+ """Use Puppeteer to authenticate and get cookies"""+ # Create a temporary file for cookie storage+ cookie_file = tempfile.NamedTemporaryFile(+ mode="w", suffix=".json", delete=False+ )+ cookie_file.close()++ # Run the Node.js auth helper. The JS file still lives under+ # tests/api_tests_with_login/ — it's shared with other Puppeteer+ # suites, so we reference it in place rather than duplicate.+ auth_script = (+ Path(__file__).parents[2]+ / "api_tests_with_login"+ / "auth_helper.js"+ )+ cmd = [+ "node",+ str(auth_script),+ BASE_URL,+ TEST_USERNAME,+ TEST_PASSWORD,+ cookie_file.name,+ ]++ try:+ result = subprocess.run(+ cmd, capture_output=True, text=True, timeout=90+ )+ if result.returncode != 0:+ raise Exception(f"Auth failed: {result.stderr}")++ # Read cookies from file+ with open(cookie_file.name, "r") as f:+ cookies = json.load(f)++ # Convert to requests format+ cookie_dict = {c["name"]: c["value"] for c in cookies}++ # Extract CSRF token+ csrf_token = None+ for cookie in cookies:+ if cookie["name"] == "csrf_token":+ csrf_token = cookie["value"]+ break++ return cookie_dict, csrf_token++ finally:+ # Clean up temp file+ if Path(cookie_file.name).exists():+ os.unlink(cookie_file.name)++[email protected](scope="session")+def auth_session():+ """Session-wide fixture for authenticated requests"""+ cookies, csrf_token = AuthHelper.get_auth_cookies()++ session = requests.Session()+ session.cookies.update(cookies)+ session.headers.update(+ {"X-CSRFToken": csrf_token, "Accept": "application/json"}+ )++ yield session, csrf_token++ session.close()+++def base_url():+ """Fixture to provide base URL"""+ return BASE_URLdiff --git a/tests/api_tests_with_login/pytest_tests/test_research_validation.py b/tests/performance/api_auth/test_research_validation.pysimilarity index 100%rename from tests/api_tests_with_login/pytest_tests/test_research_validation.pyrename to tests/performance/api_auth/test_research_validation.pydiff --git a/tests/performance/content_fetcher/__init__.py b/tests/performance/content_fetcher/__init__.pynew file mode 100644index 0000000000..e69de29bb2diff --git a/tests/research_library/downloaders/test_extraction_benchmark.py b/tests/performance/content_fetcher/test_extraction_benchmark.pysimilarity index 100%rename from tests/research_library/downloaders/test_extraction_benchmark.pyrename to tests/performance/content_fetcher/test_extraction_benchmark.pydiff --git a/tests/performance/database/__init__.py b/tests/performance/database/__init__.pynew file mode 100644index 0000000000..e69de29bb2diff --git a/tests/database/scripts/__init__.py b/tests/performance/database/scripts/__init__.pysimilarity index 100%rename from tests/database/scripts/__init__.pyrename to tests/performance/database/scripts/__init__.pydiff --git a/tests/database/scripts/create_compat_db.py b/tests/performance/database/scripts/create_compat_db.pysimilarity index 100%rename from tests/database/scripts/create_compat_db.pyrename to tests/performance/database/scripts/create_compat_db.pydiff --git a/tests/database/test_backwards_compatibility.py b/tests/performance/database/test_backwards_compatibility.pysimilarity index 100%rename from tests/database/test_backwards_compatibility.pyrename to tests/performance/database/test_backwards_compatibility.pydiff --git a/tests/performance/mcp/__init__.py b/tests/performance/mcp/__init__.pynew file mode 100644index 0000000000..e69de29bb2diff --git a/tests/mcp/echo_server.py b/tests/performance/mcp/echo_server.pysimilarity index 100%rename from tests/mcp/echo_server.pyrename to tests/performance/mcp/echo_server.pydiff --git a/tests/mcp/test_concurrent_mcp_calls.py b/tests/performance/mcp/test_concurrent_mcp_calls.pysimilarity index 100%rename from tests/mcp/test_concurrent_mcp_calls.pyrename to tests/performance/mcp/test_concurrent_mcp_calls.pydiff --git a/tests/performance/search_engines/__init__.py b/tests/performance/search_engines/__init__.pynew file mode 100644index 0000000000..e69de29bb2diff --git a/tests/search_engines/test_new_adapters_integration.py b/tests/performance/search_engines/test_new_adapters_integration.pysimilarity index 100%rename from tests/search_engines/test_new_adapters_integration.pyrename to tests/performance/search_engines/test_new_adapters_integration.pydiff --git a/tests/performance/strategies/__init__.py b/tests/performance/strategies/__init__.pynew file mode 100644index 0000000000..e69de29bb2diff --git a/tests/strategies/compare_strategies_visual.py b/tests/performance/strategies/compare_strategies_visual.pysimilarity index 100%rename from tests/strategies/compare_strategies_visual.pyrename to tests/performance/strategies/compare_strategies_visual.pydiff --git a/tests/strategies/test_adaptive_strategy.py b/tests/performance/strategies/test_adaptive_strategy.pysimilarity index 100%rename from tests/strategies/test_adaptive_strategy.pyrename to tests/performance/strategies/test_adaptive_strategy.pydiff --git a/tests/strategies/test_iterative_reasoning.py b/tests/performance/strategies/test_iterative_reasoning.pysimilarity index 100%rename from tests/strategies/test_iterative_reasoning.pyrename to tests/performance/strategies/test_iterative_reasoning.pydiff --git a/tests/strategies/test_search_system_iterative.py b/tests/performance/strategies/test_search_system_iterative.pysimilarity index 100%rename from tests/strategies/test_search_system_iterative.pyrename to tests/performance/strategies/test_search_system_iterative.py