在 Visual Studio Web Developer Express 2010 中进行测试

发布于 2025-01-07 15:21:10 字数 163 浏览 3 评论 0原文

我必须为我的 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 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

懒猫 2025-01-14 15:21:10

您可以通过创建类库并导入 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文