Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

498
Visualizações
Test that an AWS EventBridge (or CloudWatch) Event Was Fired

I'm running some integration tests on a microservice I built in AWS. One of the tests is to assert that the service triggers an AWS EventBridge event, as downstream services will need to subscribe to this event.

My question is, how do I test this in the context of my mircroservice?

I need to just assert that the event was fired in AWS. I was hoping the AWS SDK would allow some way of asserting this e.g. being able to subscribe to an event on some long polling type operation, but haven't been able to find anything.

NOTE: Not looking for test double spy answers please. The level of testing I'm doing requires confirming that an actual event has been fired in AWS EventBridge

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You can create a rule for your specific event and target an SQS.

You can then read from the SQS (using long polling) and assert the event has fired.

over 4 years ago · Santiago Trujillo Relatório

0

You can check the CloudWatch metrics for your rule such as TriggeredRules, Invocations, and FailedInvocations for debugging. Check the logging and monitoring in Amazon EventBridge here

If the rule is triggered by an event from an AWS service you can also use the TestEventPattern action to Test the event pattern of our rule with a test event to make sure the event pattern of your rule is correctly set. For more info on how to use the TestEventPattern se TestEventPattern docs

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda