A modular integration test framework for testing multiple connector implementations with shared test classes.
-
IntegrationTests.BaseTests: Core test framework with base test classes
BrowserBaseTest.cs/HttpClientBaseTest.cs: Base test classes for HTTP testingBrowserTests.cs/HttpClientTests.cs: Common test implementations with featuresSkipForConnectorsAttribute.cs: Attribute to conditionally skip tests for specific connectorsConnectorTestDiscoverer.cs: Custom test discoverer for connector-specific test filtering
-
IntegrationTests.AspNetCore: ASP.NET Core connector implementation
-
IntegrationTests.Akamai: Akamai connector implementation
dotnet test
# Set connector type
$env:CURRENT_CONNECTOR_TYPE="NetCore"
# Run tests
dotnet test IntegrationTests.AspNetCore/IntegrationTests.AspNetCore.csprojdotnet test --filter "Feature=Normalization"
Tests can be configured using environment variables:
CURRENT_CONNECTOR_TYPE: Specifies which connector is being tested (e.g., "Akamai", "NetCore")CONNECTOR_ENDPOINT: Base URL for HTTP requests (defaults to "http://localhost:5000/")
Example:
$env:CONNECTOR_ENDPOINT="https://dev-server:8080/"
$env:CURRENT_CONNECTOR_TYPE="Akamai"
dotnet test IntegrationTests.Akamai/IntegrationTests.Akamai.csproj- Create a new project with connector-specific tests
- Reference the IntegrationTests.Base project
- Create test classes that inherit from base test classes
- Set up connector-specific configuration
- Add test methods to the existing test classes or create new ones
- Apply appropriate trait attributes (e.g.,
[Trait("Feature", "YourFeatureName")]) - Use
[SkipForConnectorsAttribute]