在 Visual Studio Web Developer Express 2010 中进行测试
我必须为我的 Web 应用程序(ASP.NET - C#)编写单元测试。到目前为止,我对测试知之甚少,我到处都读到 Express 版本根本不支持测试,到目前为止我还没有找到任何其他方法来实现我的目标。我想知道是否有办法以某种方式绕过它(如果没有,我得到这个任务就很奇怪)以及如何实现测试本身。有人愿意帮助我吗?
I have to write a unit test of my web application (ASP.NET - C#). So far I know very little about testing, I have read everywhere that express edition doesn't support testing at all and so far I haven't found any other way to achieve my goal. I was wondering if there is a way to walk around it somehow and (if there isn't it is weird that I got this task) and how to implement the test itself. Would anyone please help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过创建类库并导入 nunit.framework 从 Visual Studio 中编写测试。但是,由于 EULA 禁止第三方加载项,您将无法从 Visual Studio 中运行测试。但是,您可以从命令行运行它们
请参阅 nunit 的有关运行测试的页面,发现 这里
如果您愿意的话,我假设您也可以将命令行设置为作为构建后命令运行
You can write the tests from within Visual Studio by creating a Class Library and importing nunit.framework. However, you will be unable to run your tests from within Visual Studio due to the EULA preventing third-party add-ins. You can however, run them from the command line
Refer to nunit's page on Running Tests found here
I would assume you could also set up the command line to run as a post-build command if you wanted as well