Skip to content

Updated testing #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Updated testing #167

wants to merge 1 commit into from

Conversation

rvguha
Copy link
Collaborator

@rvguha rvguha commented Jun 3, 2025

Updated testing

Updated testing
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds new test runner modules, test case definitions, and supporting shell/batch scripts for NLWeb to enable comprehensive testing of site retrieval, query retrieval, and end‐to‐end flows. It also significantly updates the documentation in the testing README to reflect these changes.

  • Added new test modules and JSON files for site, query, and end-to-end testing.
  • Introduced comprehensive and all-tests runner scripts for both Unix and Windows environments.
  • Updated the README to provide clearer usage instructions and examples.

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
code/testing/site_retrieval_tests.py New test runner and case definitions for site retrieval testing.
code/testing/site_retrieval_tests.json Added JSON test cases for site retrieval.
code/testing/run_tests_comprehensive.sh Comprehensive shell script for executing various test types.
code/testing/run_all_tests.sh Shell script for running all tests.
code/testing/run_all_tests.bat Windows batch script for running all tests.
code/testing/query_retrieval_tests.py New test runner and case definitions for query retrieval testing.
code/testing/query_retrieval_tests.json Added JSON test cases for query retrieval.
code/testing/end_to_end_tests.py New test runner and case definitions for end-to-end testing.
code/testing/end_to_end_tests.json Added JSON test cases for end-to-end testing.
code/testing/base_test_runner.py Base class updated to support new test runners and additional logging.
code/testing/azure_openai_tests.json Added JSON test cases for Azure OpenAI site retrieval.
code/testing/all_tests_example.json Example JSON file covering all test types.
code/testing/README.md Documentation updated with detailed usage instructions and examples.
Comments suppressed due to low confidence (1)

code/testing/query_retrieval_tests.py:97

  • Consider adding an inline comment clarifying the fallback from 'top_k' to 'num_results' for legacy support.
num_results=test_case.get('num_results', test_case.get('top_k', 10)),

if isinstance(result, dict):
url = result.get('url', result.get('link', ''))
elif isinstance(result, list) and len(result) >= 3:
url = result[2] # Assuming [name, description, url, score, ...]
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document the assumptions regarding the list structure (e.g., expecting the URL at index 2) to clarify the extraction logic.

Suggested change
url = result[2] # Assuming [name, description, url, score, ...]
# Assuming the list structure is [name, description, url, score, ...].
# The URL is expected to be at index 2 based on the data source's format.
url = result[2]

Copilot uses AI. Check for mistakes.

@jennifermarsman jennifermarsman self-assigned this Jun 10, 2025
rvguha added a commit that referenced this pull request Jun 18, 2025
- Added modular testing framework with base_test_runner.py
- Added specific test runners for end-to-end, site retrieval, and query retrieval tests
- Added comprehensive test runner scripts (run_all_tests.sh/.bat, run_tests_comprehensive.sh)
- Updated run_tests.py to be a test dispatcher that routes to appropriate test runners
- Added JSON test configuration files for different test types
- Updated testing README with comprehensive documentation
- Preserved all existing functionality while adding new testing capabilities

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants