This is a simple quick start on how to configure a .NET State Machine (AWS Step Functions) using XRay instrumentation and Tracetest for enhancing your E2E and integration tests with trace-based testing. The infrastructure will use Jaeger as the trace data store and Terraform to provision the required AWS infrastructure (Fargate/Lambda).
- Install the tracetest CLI
- From the
infra
folder runterraform init
andterraform apply
and accept the changes - From the terraform outputs, grab the
tracetest_url
and runtracetest configure --server-url <tracetest_url>
on a terminal to configure the CLI to send all commands to that address - From the
src
folder runsam build
andsam deploy --guided
- Follow the instructions from the guided deployment
- Grab the API gateway endpoint from the outputs, and update the
<your_api_endpoint>
section fromtest/incident.yaml
and thetest/exam.yaml
files - Inject the Tests and Transactions definitions to the tracetest server using the following:
tracetest run test -f tests/incident.yaml \
tracetest run test -f tests/exam.yaml \
tracetest run transaction -f tests/transaction.yaml
Feel free to check out the docs, and join our Slack Community for more info!