We're using ServiceStack for a client project with several distinct problem domains, which we'd prefer to keep separated. We've developed a testing framework that spins up an AppHostHttpListener and sets up an in-memory test database using SQLite and DbUp - but, as you know, a test session's AppDomain can only have one AppHost at a time.
On the other hand, we have two different AppHosts that we want to deploy, let's call them Foo
and Bar
. Foo
accepts requests and passes them to Bar
, so Foo -> Bar
, and Bar is standalone.
We want to be able to write end-to-end integration tests that exercise instances of both Foo
and Bar
. With ServiceStack's limitation of one AppHost per AppDomain, we seem to have the following options:
My questions to you are:
The only way to test multiple Services in memory is to combine them in the same Test AppHost which will only need the to register the dependencies the integration tests are testing. In memory Integration tests normally have a Custom AppHost built to task, the AppHost isn't part of the test.
The alternative is to use IIS Express and start instances of the endpoints used in the integration test before running them.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments