8000 Messaging pacts - guidelines to provide real message to verifier · Issue #538 · pact-foundation/pact-net · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Messaging pacts - guidelines to provide real message to verifier #538
Closed
@scrocquesel-ml150

Description

@scrocquesel-ml150

I'm working on implementing the messaging verifier.
In my case, the provider sends messages to an Azure Service Bus in response to certain interactions. I want to verify that these messages conform to the consumer pact.

Looking at the examples, it seems that messages are manually constructed in the tests. #459 call them canned message. IMHO, this introduces a risk of divergence between the actual messages sent by the application and the ones defined in the test.

What I’ve done instead is configure the provider to send messages to a Service Bus Testcontainer during integration tests. A MessageProcessor dequeues the messages and transforms them into Pact scenarios. Once all integration tests have passed, I use the collected scenarios with the message pact verifier.

What do you think of this approach?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0