Are there any must have tools for Java Script (RIA) development like maven, jUnit, Emma, link4j etc. for Javascript? What is the best way to set up a continous integration system for a bigger application or framework? How do projects like jQuery test their code? How to manage dependencie开发者_如何学编程s and different project configurations?
tools i know so far:
- javascript-maven-tools (is maven the right choice?)
- jslint
- yuicompressor
- sprockets (found it 5 mins ago)
- jsunit
- selenium
Hudson is a good tool for managing your build and test jobs. And it has a Selenium plugin.
Edited to provide a better answer: Your question is quite broad, with few details about your situation or the actual problems that you've encountered, so I'll give you a quick overview based on my experience.
Build automation is a good thing. It's good to detect build failures and test failures as soon as possible. I recommend automating your tests in a standard environment so that they run as soon as possible after a commit. And I recommend making your release build as simple and reproducible as pushing a button.
Martin Fowler has a good list of recommended practices.
And a previous question contains a description of how to run javascript unit tests with CI.
Specifically regarding Hudson, we use Hudson because it's flexible, it allows a central server to manage builds on Windows and Linux slaves, and it's got plugins to support lots of different workflows and tools.
As for dependencies, Hudson allows you to trigger builds on the completion of other builds, which is good for firing off various tests after a successful product build. If you're asking how you should deal with external dependencies, you'll have to figure out what policy makes sense based on your application's design and requirements. I've seen a couple other javascript questions go by recently about how to handle such dependencies.
jQuery uses QUnit. Another compressor is Crockfords JSMIN.
精彩评论