Easily run integration tests for your backends
APACHE-2.0 License
Jest OpenTelemetry allows you to write, build and run integration tests based on OpenTelemetry traces with Jest-like syntax. You can:
All with just a few lines of code.
It's built and maintained by Traceloop under the Apache 2.0 license.
npm i --save-dev @traceloop/jest-opentelemetry
Then, you can start testing your microservices:
const traceloop = new TraceLoop();
await traceloop.axiosInstance.post('http://my.awesome.website/orders/create');
await traceloop.fetchTraces();
expectTrace(traceloop.serviceByName('emails-service'))
.toReceiveHttpRequest()
.ofMethod('POST')
.withBody({ emailTemplate: 'orderCreated', itemId: '123' });
More info can be found in our docs.
Jest OpenTelemetry can be used to test anything that's happening in your system. We're constantly adding more, and you're welcome to suggest yours.
Whether it's big or small, we love contributions ❤️ Check out our guide to see how to get started.
Not sure where to get started? You can: