Is it best practice to test my Web API controllers directly or through an HTTP client?

前端 未结 8 1870
故里飘歌
故里飘歌 2021-02-05 10:08

I\'m adding some unit tests for my ASP.NET Core Web API, and I\'m wondering whether to unit test the controllers directly or through an HTTP client. Directly would look roughly

8条回答
  •  深忆病人
    2021-02-05 10:42

    If you are looking for some non programming You can use Postman, and can create collection of requests and can test multiple requests one by one.

提交回复
热议问题