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
Kristof

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