C#C
C#4y ago
Thinker

Integration testing a web API [Answered]

Just for the sake of the learning experience, I wanna write some integration tests for the endpoints in my web API. What's the typical way of doing this? Do you have to use some kind of
HttpClient
setup to call the API as if using HTTP or is there some better way of just testing the endpoints individually? For context, all of my endpoints return Task<IResult>, so I (probably) can't just test the direct return value of each endpoint method.
Was this page helpful?