Skip to content

Add xUnit integration tests for Azure Search Emulator#18

Merged
paulirwin merged 3 commits into
mainfrom
issue/17
Nov 20, 2025
Merged

Add xUnit integration tests for Azure Search Emulator#18
paulirwin merged 3 commits into
mainfrom
issue/17

Conversation

@paulirwin

Copy link
Copy Markdown
Member
  • Create AzureSearchEmulator.IntegrationTests project with Testcontainers
  • Implement 8 comprehensive integration tests covering:
    • Index creation and deletion
    • Document indexing and retrieval
    • Search functionality with filtering, sorting, and paging
  • Use product/e-commerce domain with realistic test data
  • Add DebugClient project for local debugging/diagnostics

Fixes #17

🤖 Generated with Claude Code

- Create AzureSearchEmulator.IntegrationTests project with Testcontainers
- Implement 8 comprehensive integration tests covering:
  - Index creation and deletion
  - Document indexing and retrieval
  - Search functionality with filtering, sorting, and paging
- Use product/e-commerce domain with realistic test data
- Add DebugClient project for local debugging/diagnostics

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

Co-Authored-By: Claude <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

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 comprehensive integration testing infrastructure for the Azure Search Emulator using xUnit and Testcontainers, along with a debug client for manual testing and diagnostics.

  • Implements 8 integration tests covering core Azure Search operations (index management, document indexing, search with filtering/sorting/paging)
  • Adds Testcontainers-based test infrastructure to run tests against a containerized emulator instance
  • Includes enhancements to the emulator codebase for better OData route handling, cache management, and wildcard query support
  • Provides a DebugClient console application for local development and diagnostics

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
AzureSearchEmulator.IntegrationTests/EmulatorIntegrationTests.cs Comprehensive integration tests covering index creation/deletion, document operations, and search functionality with various filters and options
AzureSearchEmulator.IntegrationTests/EmulatorFactory.cs xUnit test fixture that manages Docker container lifecycle for the emulator using Testcontainers
AzureSearchEmulator.IntegrationTests/Product.cs Test domain model representing e-commerce products for integration tests
AzureSearchEmulator.IntegrationTests/AzureSearchEmulator.IntegrationTests.csproj Test project configuration with Azure SDK and Testcontainers dependencies
DebugClient/Program.cs Console application for manual testing of emulator endpoints with comprehensive error handling
DebugClient/DebugClient.csproj Debug client project configuration
AzureSearchEmulator/Searching/LuceneNetIndexSearcher.cs Enhanced with wildcard query support and error handling for missing indexes
AzureSearchEmulator/SearchData/SimpleFSDirectoryFactory.cs Added cache clearing functionality for proper resource cleanup on index deletion
AzureSearchEmulator/SearchData/LuceneDirectoryReaderFactory.cs Added reader cache clearing for resource management
AzureSearchEmulator/Controllers/*.cs Updated OData route patterns and added quote-stripping logic for URL parameters
AzureSearchEmulator/Program.cs Improved HTTP request logging format
README.md Added contributing guidelines and testing instructions
AzureSearchEmulator.sln Added new test and debug client projects to solution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AzureSearchEmulator/SearchData/LuceneDirectoryReaderFactory.cs Outdated
Comment thread DebugClient/Program.cs
Comment thread AzureSearchEmulator.IntegrationTests/EmulatorFactory.cs
Comment thread AzureSearchEmulator.IntegrationTests/EmulatorFactory.cs
Comment thread AzureSearchEmulator/Controllers/DocumentIndexingController.cs
Comment thread AzureSearchEmulator.IntegrationTests/EmulatorFactory.cs Outdated
Comment thread AzureSearchEmulator/Searching/LuceneNetIndexSearcher.cs
Comment thread AzureSearchEmulator.IntegrationTests/EmulatorFactory.cs
Comment thread AzureSearchEmulator.IntegrationTests/EmulatorFactory.cs
Comment thread DebugClient/Program.cs Outdated
@paulirwin
paulirwin merged commit 2faab94 into main Nov 20, 2025
1 check passed
@paulirwin
paulirwin deleted the issue/17 branch November 20, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration tests

2 participants