[英]Automated Unit testing for Javascript integrated with CruiseControl, nUnit, nAnt and ASP.net MVC
I work for a team of ASP.net MVC and they are using Cruisecontrol, nUnit and nAnt for the automated testing and build.我为 ASP.net MVC 团队工作,他们使用 Cruisecontrol、nUnit 和 nAnt 进行自动化测试和构建。 I am new to the group and i handle the Javascript layer and i am looking for ways to incorporate my work with my teams workflow.
我是小组的新手,我处理 Javascript 层,我正在寻找将我的工作与我的团队工作流程结合起来的方法。
Are there any possoble way to do this?有没有办法做到这一点?
Thanks谢谢
A few thoughts:一些想法:
Just a couple of days ago, John Resig announced a JavaScript unit test automator he's working on called Test Swarm .就在几天前,John Resig 宣布了他正在开发的名为Test Swarm的 JavaScript 单元测试自动机。 It's just now going into alpha, but it might be worth watching.
它刚刚进入 alpha 阶段,但可能值得一看。
I've found JSUnit to be a pretty good unit testing tool for javascript.我发现 JSUnit 是 javascript 的一个非常好的单元测试工具。
You might also consider using javascript lint (link below).您也可以考虑使用 javascript lint(下面的链接)。 It's a static code analyzer (not a unit testing tool) and I've had good experiences with it in the past.
这是一个 static 代码分析器(不是单元测试工具),我过去有过很好的经验。 It's not as thorough as some of the complied language lint tools, but it can save you from making some truly evil mistakes in javascript.
它不如某些已编译的语言 lint 工具那么彻底,但它可以使您免于在 javascript 中犯一些真正邪恶的错误。 You can run it from the web page or the command line, so it should wire into a build process pretty easily.
您可以从 web 页面或命令行运行它,因此它应该很容易连接到构建过程。
http://www.javascriptlint.com/index.htm http://www.javascriptlint.com/index.htm
As @Charlie mentions, JsUnit is a good choice for automated unit testing, via JsUnit Server .正如@Charlie 所提到的,JsUnit 是通过JsUnit Server进行自动化单元测试的不错选择。
QUnit is a new unit testrunner, is highly customizable, I've been playing with it and you can integrate and check the test results through browser automation tools like Selenium . QUnit是一个新的单元测试运行器,高度可定制,我一直在玩它,您可以通过Selenium等浏览器自动化工具集成和检查测试结果。
That's pretty much what we have at the moment, but a very promising project is emerging right now, TestSwarm by Mr. John Resig, check this blog post for more information (and sign up for the alpha release:):这几乎是我们目前所拥有的,但是现在正在出现一个非常有前途的项目,John Resig 先生的TestSwarm ,查看此博客文章以获取更多信息(并注册 alpha 版本:):
Looks really interesting:看起来真的很有趣:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.