How to test EventBridge events

Hey friends! My team is picking up a task to integrate with EventBridge for the first time. I’ve been assured that “testing this is a huge pain and nearly impossible”. Great! So I was wondering if anyone has any experience they’d be willing to share.
Also Googling but I love this community :smiley:

1 Like

Event-based, always fun! Nothing is impossible so don’t let you tell otherwise!
Most of the time it’s just sitting together with developers talking about it and finding a way to test it.

For example for performance testing:
Since we don’t know when the event is done with a huge load and we basically get a response back saying 200 OK and in the background the event is still taking place. We added a header on the API. ‘Correlation-Id’. Every user simulated has a unique id and can be tracked through the whole system.

How does it work?
So let’s say you do action X with user 1 - the ID would be 1, this ID will be passed on through all the connected events. Therefor you can see in the logs: For user 1 you lookup ID 1 in the logs and you can check how long the event took. (performance wise for 1000+ users)

For API testing & automation, I believe restSharp has a way to ‘easy’ create a async call. I’m not to sure about it nor have I used it myself. But it’s on my radar to look into it! :smiley:

Hope it already helps a bit!

Kind regards

Great idea there - we use correlation IDs in other places, so that shouldn’t be that difficult to implement!
Yes, RestSharp can handle that for sure, however I am using JS and SuperTest in this instance. But I can always async/await in JS, so not a problem.
thanks for the ideas!

1 Like