Web api integration testing

I have an integration project and a web api project in the same solution. Integration tests use RestSharp to invoke the web api. When doing the integration tests, I want to start the web api project first. Is it possible?

+4
source share
1 answer

The best way I've found to do this is with a Self Host WebApi target project. Then, if you want to run these tests on a build server, etc., you do not need an installed web server.

This is a pretty good walk when setting up Self Host.

, HttpSelfHostServer HttpSelfHostConfiguration .

+4

Source: https://habr.com/ru/post/1523504/


All Articles