[undertow-dev] Testing custom HttpHandlers

Stuart Douglas sdouglas at redhat.com
Sun Jan 15 17:32:49 EST 2017


We do publish tests-jars, so you can actually use DefaultServer,
however I agree that this is not really ideal.

I think the ideal solution would be to take the core functionality
from DefaultServer and create a new repo (undertow-test-runner) and
create some kind of UndertowRunner class that is based on
DefaultServer. Does this sound reasonable?


Stuart

On Sun, Jan 15, 2017 at 7:22 AM, Bill O'Neil <bill at dartalley.com> wrote:
> Hello,
>
> How would you recommend testing custom HttpHanders? The DefaultServer class
> in core part of the test code so it is not included in the jar for reuse.
> Would it be reasonable to pull testing utils into their own project so it
> can be reused? Or would you recommend just mocking a HttpServerExchange and
> passing that to the HttpHandler?
>
> Thanks,
> Bill
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev


More information about the undertow-dev mailing list