Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/traceloop/jest-opentelemetry
Easily run integration tests for your backends
https://github.com/traceloop/jest-opentelemetry
api-testing e2e-testing integration-testing javascript jest open-telemetry otel reliability test-automation testing tracing typescript
Last synced: 2 months ago
JSON representation
Easily run integration tests for your backends
- Host: GitHub
- URL: https://github.com/traceloop/jest-opentelemetry
- Owner: traceloop
- License: apache-2.0
- Created: 2023-02-16T20:59:01.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-16T18:07:22.000Z (about 1 year ago)
- Last Synced: 2024-09-30T10:20:51.228Z (2 months ago)
- Topics: api-testing, e2e-testing, integration-testing, javascript, jest, open-telemetry, otel, reliability, test-automation, testing, tracing, typescript
- Language: JavaScript
- Homepage: https://www.traceloop.com
- Size: 3.25 MB
- Stars: 256
- Watchers: 2
- Forks: 8
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-jest - @traceloop/jest-opentelemetry
README
Jest OpenTelemetry
Integeration tests with 10 lines of code
Get started ยป
Slack |
Docs |
Examples |
Website
Jest OpenTelemetry allows you to write, build and run integration tests based on OpenTelemetry traces with [Jest-like](https://jestjs.io/) syntax. You can:
- ๐ต๏ธ Test any side-effect in your system: an email was sent, a database was updated, a BI event was reported, etc.
- ๐ฉโ๐ป Run your tests and connect to a local or remote test environment.All with just a few lines of code.
It's built and maintained by Traceloop under the Apache 2.0 license.
## ๐ Getting Started
```js
npm i --save-dev @traceloop/jest-opentelemetry
```Then, you can start testing your microservices:
```js
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](https://traceloop.com/docs/jest-otel/getting-started).
## What can you test?
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](https://github.com/traceloop/jest-opentelemetry/issues).### Service Assertions
- [x] [REST](http://traceloop.com/docs/jest-otel/syntax/services-rest)
- [ ] GraphQL
- [x] [GRPC](http://traceloop.com/docs/jest-otel/syntax/services-grpc)### Database Assertions
- [x] [PostgreSQL](http://traceloop.com/docs/jest-otel/syntax/db-pg)
- [ ] MongoDB
- [x] [Redis](http://traceloop.com/docs/jest-otel/syntax/db-redis)
- [ ] S3### Analytics Reporting Assertions
- [ ] Segment
- [ ] Snowflake
- [ ] BigQuery
- [ ] Posthog### External Systems Assertions
- [ ] SendGrid
- [ ] Stripe## ๐ฑ Contributing
Whether it's big or small, we love contributions โค๏ธ Check out our guide to see how to [get started](https://traceloop.com/docs/contributing/overview).
Not sure where to get started? You can:
- [Book a free pairing session with one of our teammates](mailto:[email protected]?subject=Pairing%20session&body=I'd%20like%20to%20do%20a%20pairing%20session!)!
- Join our Slack, and ask us any questions there.## ๐ Community & Support
- [Slack](https://join.slack.com/t/traceloopcommunity/shared_invite/zt-1plpfpm6r-zOHKI028VkpcWdobX65C~g) (For live discussion with the community and the Traceloop team)
- [GitHub Discussions](https://github.com/traceloop/jest-opentelemetry/discussions) (For help with building and deeper conversations about features)
- [GitHub Issues](https://github.com/traceloop/jest-opentelemetry/issues) (For any bugs and errors you encounter using Jest OpenTelemetry)
- [Twitter](https://twitter.com/traceloopdev) (Get news fast)