1.7 KiB
1.7 KiB
description
| description |
|---|
| Run Azure Functions integration tests |
Run Azure Functions integration tests for the Datadog .NET tracer.
Test options:
-
Full Azure Functions test suite:
.\build.cmd BuildAndRunWindowsAzureFunctionsTests -
Run specific test projects:
dotnet test tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Datadog.Trace.ClrProfiler.IntegrationTests.csproj --filter "FullyQualifiedName~AzureFunctions" -
Test with specific function app samples:
- Sample apps location:
tracer/test/test-applications/azure-functions/ - Available samples:
- In-process (.NET Framework, .NET 6+)
- Isolated worker (.NET 5+, .NET 7+)
- HTTP triggers, timer triggers, queue triggers
- Various runtime versions
- Sample apps location:
Test scenarios covered:
- In-process model: Functions running in the same process as the host
- Isolated worker model: Functions running in separate worker process
- Instrumentation: Auto-instrumentation via site extension or NuGet package
- Trace propagation: HTTP headers, queue messages
- Metrics: Runtime metrics, custom metrics
- Logging: ILogger integration with Datadog
Before running tests:
- Ensure Docker is running (some tests require containers)
- Check Azure Functions Core Tools are installed:
func --version - Verify build is up to date
Common test filters:
--filter "Category=AzureFunctions"- All Azure Functions tests--filter "Category=Smoke&FullyQualifiedName~AzureFunctions"- Smoke tests only--framework net6.0- Specific framework
After running:
- Review test results (passed/failed/skipped)
- Check test logs for instrumentation verification
- Analyze any failures for patterns
- Verify traces are properly generated