Skip to content

Add Testcontainers-based Integration Testing#2

Merged
ajeetraina merged 1 commit intomainfrom
add-testcontainers
Mar 20, 2025
Merged

Add Testcontainers-based Integration Testing#2
ajeetraina merged 1 commit intomainfrom
add-testcontainers

Conversation

@ajeetraina
Copy link
Owner

@ajeetraina ajeetraina commented Mar 20, 2025

This PR adds a comprehensive testing framework using Testcontainers for the GenAI application.

Features Added

  1. Basic Test Framework:

    • Setup for testing the GenAI application
    • Test helpers for making API requests
    • Simplified test environment setup
  2. Testcontainers Integration:

    • Placeholder for container-based testing
    • Structure for testing with isolated containers
    • Simplified implementation for initial testing
  3. Test Categories:

    • API Integration Tests: Verifies endpoints and basic functionality
    • LLM Quality Tests: Basic structure for testing response quality
    • Performance Tests: Structure for testing response times
    • Multi-turn Conversation Tests: Structure for testing context maintenance
  4. Convenience Features:

    • Skip tests in short mode
    • Makefile for running different test scenarios
    • Documentation for using the test framework

Current Implementation

This is a simplified implementation to get the tests running. The full Testcontainers functionality will be implemented incrementally:

  1. First phase (this PR): Get the tests to compile and run against a local environment
  2. Second phase: Implement actual container creation with Testcontainers
  3. Third phase: Add more sophisticated test cases and validation

How to Run

cd tests
go test -v ./integration            # Run all tests
go test -v ./integration -short     # Run only short tests

See the TESTCONTAINERS.md file for more details and options.

@ajeetraina ajeetraina merged commit b322f20 into main Mar 20, 2025
1 check failed
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.

1 participant