如何使用asp.net 5项目(尤其是ReSharper)运行nunit测试? [英] How to run nunit tests with asp.net 5 projects, especially with ReSharper?

查看:39
本文介绍了如何使用asp.net 5项目(尤其是ReSharper)运行nunit测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发针对dnx451的asp.net 5应用程序.

I am developing an asp.net 5 application targeting dnx451.

asp.net 5项目依赖一些库,这些库具有为nunit 2.x编写的单元测试.因此,对我而言,合理的选择是使用nunit测试asp.net 5项目.

The asp.net 5 project relies some libraries with unit-tests written for nunit 2.x. So the reasonable choice for me is to use nunit for testing the asp.net 5 project.

当我在ReSharper中运行单元测试时,ReSharper会说测试未运行",并显示附加消息"System.IO.FileNotFoundException:无法加载文件或程序集xxx".

When I running the unit test in ReSharper, the ReSharper says "Test not run" with additional message "System.IO.FileNotFoundException: Could not load file or assembly xxx ".

nunit 2.6.4和3.0.0-beta-2都会产生相同的错误.

Both nunit 2.6.4 and 3.0.0-beta-2 results the same error.

有人成功针对dnx项目运行nunit测试吗?

Any one has successfully running nunit tests against an dnx project?

推荐答案

DNX测试.这是一个全新的执行模型,尚未为ReSharper实施.我希望随着DNX和asp.net稳定并即将发布而看到支持.另外,我不相信nunit本身支持作为DNX测试运行程序运行-xunit团队有一个单独的项目可插入DNX: https://github.com/xunit/dnx.xunit

DNX tests aren't currently supported by ReSharper. It's a whole new execution model, and hasn't yet been implemented for ReSharper. I'd expect to see support as DNX and asp.net stabilise and near release. Also, I don't believe nunit itself supports running as a DNX test runner - the xunit team have a separate project to plug into DNX: https://github.com/xunit/dnx.xunit

这篇关于如何使用asp.net 5项目(尤其是ReSharper)运行nunit测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆