hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Hübner" <sthueb...@googlemail.com>
Subject HttpCore to mock remote servers in unit tests?
Date Fri, 06 Apr 2007 15:21:15 GMT
Hi,

The recent release of HttpCore's alpha release made me think, I could
use this library as a very lightweight server to mock remote services
in scenarios where I want my code to be integration tested. E.g. I
maintain a web application, which communicates with some backend
services via HTTP. In order to test the application's behaviour I want
to be able to create an environment where the application's requests
to it's backend services can actualy be monitored.

So I thought, I could set up a small server based on
HttpCore-components. I progressed up to the point where I actually
were about to check parameters of the requests, the mocked server
received. There I stuck since HttpCore's HttpRequest-Interface is
lacking any higher level API to read it's parameters.

Maybe, that interface is just not intended to serve use cases like the
one described above? Or did I miss something?

Anyone out there who tried something like this before?

Regards,
Stefan Hübner
Mime
View raw message