在 NUnit 中运行的测试的环境配置
我有一些集成测试,可以访问网络服务器并验证某些功能。根据构建环境,服务器将位于不同的地址(http://localhost:8080/,< a href="http://test-vm/" rel="nofollow noreferrer">http://test-vm/ 等)。 我想从 TFS 构建运行这些测试。
我想知道配置这些测试的适当方法是什么?我只需在配置文件中添加一个设置吗?我目前正在这样做。顺便说一句,我们每个测试环境都有一个单独的分支,因此我可以为每个环境签入不同的配置文件。我想知道是否有更好的方法?
我希望构建项目能够告诉测试要测试什么服务器。这看起来更好,因为这样我就不必在每个分支的基础上维护配置信息。
我相信我会使用 NUnit 进行 Team Build (http://nunit4teambuild.codeplex.com/)让 NUnit/TFS 一起发挥作用。
I have some integration tests that hit a webserver and verify certain functionalities. Depending on the build environment, the server will be at a different address (http://localhost:8080/, http://test-vm/, etc).
I would like to run these tests from a TFS build.
I'm wondering whats the appropriate way to configure these tests? Would I just add a setting to the config file? I'm doing that currently. Incidentally we do have a separate branch per test environment, so I could have a different config file checked in for each environment. I wonder if there is a better way though?
I'd like the build project to be able to tell the test what server to test. This seems better because then I don't have to maintain config information on a per branch basis.
I believe I'd be using NUnit for Team Build (http://nunit4teambuild.codeplex.com/) to get NUnit/TFS to play together.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以想到几个选项:
I can think of a couple options: