API Testing · Senior · Question 20 of 75

How do you test an event-driven API that publishes to a message broker?

Show the answer

Correct answer: Consume the topic in tests and check payload, keys and schema

Explanation

The HTTP call may succeed while the event is missing or malformed. Tests subscribe, wait with a timeout and assert the message.

Further reading

Problem with a question

API Testing · Senior · question 20

Test yourself

Take the API Testing · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz