Integration Tests

Hi,

I am looking to write some integration tests against an in memory event store, but can’t find a way of loading projections automatically into the Event Store on startup rather than adding them to the console manually after start up?

Has anyone any ideas on this?

Kind regards,

Mark

Have you looked at embedded? What language are you writing in?

Hi Greg,

I am writing in Java. I haven’t had a look at embedded, but will look it up on the site now,

Thank you for responding

Kind regards,

Mark

you can't run embedded in java, what you can do is send up the http
requests to start projections.
https://github.com/EventStore/EventStore/blob/release-v4.0.0/src/EventStore.ClientAPI/Projections/ProjectionsClient.cs
should give you required uris.

Thanks Greg, much appreciated.

I’ll have a look at this today.

Kind regards,

Mark

You can find an example for creating a projection in the event-store-commons HTTP Event Store implementation: (See method “createProjection(…)”. If you want to use the commons directly for your test, you can use the ProjectionAdminEventStore interface together with the HTTP EVent Store implementation. Maven based integration tests could be easily done with the Event Store Maven Plugin.