Iron: testing routes


Does anyone know of an example of testing Iron routes (I’m using the router crate) that doesn’t require starting the entire server and curling (or using another http client) the endpoints ?


You can look at how it’s done in rustc-perf: The approach we use there is to construct the ‘Chain’ that Iron uses and send the requests to it directly.


Thanks. I’ll give that a read soon.


That’s what I needed plus some bonus information like finding out about the existence of iron-test.

Thanks for the response.