如何介绍.NET 6 Xunit测试?

发布于 2025-02-03 02:13:24 字数 255 浏览 2 评论 0原文

我以前曾问过这个问题和回答,但是这些解决方案不再适用于.NET 6或依靠不再维护且没有.NET 6支持的第三方库。

我有一些Xunit测试需要太多时间进行运行,我想介绍它们以查看时间在哪里。

我尝试过蚂蚁和点曲线,但无法运行该项目并给我个人资料。

有人知道解决这个问题的解决方案吗?

我尝试了许多建议的解决方案来添加program.cs文件,并让测试项目也作为控制台应用程序运行,但在最新的.NET版本中无效。

I have seen this question asked and answered before, but the solutions no longer work for .Net 6 or rely on 3rd party libraries that are no longer maintained and don't have .Net 6 support.

I have some xUnit tests that are taking too much time to run and I'd like to profile them to see where the time is being spent.

I've tried ANTS and DotTrace but cannot get either to run the project and give me a profile.

Does anyone know a solution to this problem?

I've tried numerous suggested solutions for adding a Program.cs file and letting the tests project also run as a console app, but none work in the latest .Net versions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文