有人对如何使用 qUnit 进行持续集成(例如巡航控制)有任何建议吗?
我们希望使用 qUnit 进行一些单元测试。我们使用 Cruise Control 进行持续集成。只是好奇是否有人以自动化方式集成了 qUnit,如果是的话,你做了什么才能让它一切正常工作......
we're looking to do some unit testing with qUnit. we use Cruise Control for continuous integration. just curious if anyone has integrated qUnit in an automated fashion, and if so, what you did to get it all working...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不久前,我设置了一个 Jenkins CI 来执行此操作,我们的方式是编写一个 NUnit 测试来运行 WatiN(当然,selenium 也可以工作),然后运行 QUnit 测试,并使用选择器来检查任何错误,并为每个失败的测试断言失败。由于 JavaScript 引擎的差异,确保在正确的浏览器中进行测试非常重要。例如,如果您的目标平台包括 Chrome,则 WatiN 将无法工作,因为它无法控制 Chrome(我上次检查过)。
I set up a Jenkins CI to do this a while back, the way we did it was to write an NUnit test to run WatiN (selenium would work as well of course), that would then run the QUnit tests, with selectors to check for any errors and fail an assert for every test that failed. It's very important that you make sure you are testing in the correct browser due to differences in the javascript engines. For example, WatiN wouldn't work if you target platforms include Chrome because it can't control Chrome (last I checked).
你见过开源的NQUnit吗?我还没有尝试过,但我计划在即将到来的项目中使用它。
Have you seen the open source NQUnit? I haven't tried it yet but I plan on using it in an upcoming project.