[英]How to run unit tests when running the application in visual studio
[英]how to run xUnit integration tests written using Restharp and web application at a time in visual studio?
我已经使用 Restsharp 和 xUnit 为 API 编写了集成测试,并将这个测试项目添加到现有的 Web API 项目中。 我无法在 localhost 中运行那些 xUnit 集成测试,因为它需要应用程序正在运行,我如何才能同时运行两个项目(集成测试项目和 Web 应用程序项目)?
在终端中运行 API:
打开cmd.exe
,导航到您的 API 项目文件夹(.csproj 文件所在的位置)。
运行命令dotnet run
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.