简体   繁体   English

在 Visual Studio 2015 (à la SharpDevelop) 中测试资源管理器树视图?

[英]Test explorer tree view in Visual Studio 2015 (à la SharpDevelop)?

I have just started using Visual Studio 2015 after having used SharpDevelop for several months.在使用 SharpDevelop 几个月后,我刚刚开始使用 Visual Studio 2015。 One of the things I miss the most is the tree view of the unit tests (Nunit in my case, with the TestAdapter working OK to show the tests in the test explorer).我最怀念的一件事是单元测试的树视图(在我的例子中是 Nunit,TestAdapter 可以正常工作以在测试资源管理器中显示测试)。 I am used to write the tests a in a separate assembly mirroring the folder and file structure of the project to test, so a tree view in the test explorer should be something natural, the same way a tree view is natural in the solution explorer.我习惯于在一个单独的程序集中编写测试,镜像要测试的项目的文件夹和文件结构,因此测试资源管理器中的树视图应该是自然的,就像解决方案资源管理器中的树视图是自然的一样。

In this way, I could run a single test, or the tests covering a single class, namespace, project or solution, everything from a single view, no need to be regrouping.通过这种方式,我可以运行单个测试,或者测试涵盖单个类、命名空间、项目或解决方案,所有内容都来自一个视图,无需重新组合。 But Visual Studio just groups the tests according to a few parameters, so I have to constantly change the grouping.但是 Visual Studio 只是根据几个参数对测试进行分组,因此我必须不断更改分组。 Also, in SharpDevelop the tree nodes were preceded by a green/red dot that allowed you to easily find the failing tests.此外,在 SharpDevelop 中,树节点前面有一个绿/红点,让您可以轻松找到失败的测试。

So, is there any way to have a tree-view-ish window in Visual Studio 2015, showing the unit tests á la SharpDevelop?那么,有没有办法在 Visual Studio 2015 中创建一个树状视图窗口,显示 SharpDevelop 的单元测试?

I saw this in the ReSharper extension, which is paid.. VS'15' (still in beta https://blogs.msdn.microsoft.com/visualstudioalm/2016/08/05/evolving-the-visual-studio-test-platform-part-2/ ) appears to be almost there with namespace grouping, but still does not look like a full tree functionality.我在付费的 ReSharper 扩展中看到了这一点.. VS'15'(仍处于测试阶段https://blogs.msdn.microsoft.com/visualstudioalm/2016/08/05/evolving-the-visual-studio-test -platform-part-2/ ) 似乎与命名空间分组差不多,但看起来仍然不像完整的树功能。 I am also interested in finding a free alternative.我也有兴趣寻找免费的替代品。

In Visual Studio 2015 I use AxoCover for running Unit Tests.在 Visual Studio 2015 中,我使用AxoCover来运行单元测试。 It provides a nice Tree View of the unit tests, grouping by project and namespace.它提供了一个很好的单元测试树视图,按项目和命名空间分组。 It works with Visual Studio 2012 - 2017. I haven't heard of a 2019 version of AxoCover though.它适用于 Visual Studio 2012 - 2017。不过我还没有听说过 2019 版的 AxoCover。 Hope it helps someone else stuck on old versions of Visual Studio.希望它可以帮助其他人坚持使用旧版本的 Visual Studio。

AxoCover 截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM