Search code examples
.netunit-testingrabbitmqautomated-testsmasstransit

Run MassTransit/RabbitMQ instance in memory


I want to implement integration tests. And I would like to not up RabbitMQ instance for it and the only change I want is to modify connection settings in tests (to use memory instance). Is it possible ?


Solution

  • There is no in-memory instance of RabbitMQ. You could, as pointed out in the comments above, stand up RabbitMQ in a container to run the tests. This is what MassTransit does using GitHub Actions.

    MassTransit also has an extensive in-memory transport which can be used for unit tests.