Falco icon indicating copy to clipboard operation
Falco copied to clipboard

Testing API over http

Open dcook-net opened this issue 1 year ago • 1 comments

Hi.

I was just wondering how you'd got about testing Web API over http. I was trying to create a HostBuilder().ConfigureWebHost() and then start a TestServer, but it kina of assumes classs and methods in your Program file, and it's all a bit painful. I assume there is a better way?

dcook-net avatar Mar 22 '24 14:03 dcook-net

Hi @dcook-net,

I had encountered the same issue a while back and found the solution mentioned in https://github.com/dotnet/fsharp/issues/18302#issuecomment-2646464317 helpful.

haysch avatar May 25 '25 19:05 haysch

Sorry guys, been a minute since I could spend much time doing OSS.

Have a look at the tests directory. There is an example of how to do integration testing there.

pimbrouwers avatar Jun 26 '25 15:06 pimbrouwers