I am using jquery and HTML 5 techniques (like File API, HistoryAPI) extensively
ID: 646624 • Letter: I
Question
I am using jquery and HTML 5 techniques (like File API, HistoryAPI) extensively in a project I am working on.
I was wondering what tools I can use for
quality assurance my javascript and front end code
unit testing my javascript and front end code
Let me share some background info.
If somebody asked me about this for PHP, I would say, use PHPUnit for writing unit tests, use PHP CodeSniffer and then with the help of Phing and Jenkins, put this all into a single build process.
I basically want to know if something similar can be pulled off with javascript using Jenkins.
Do share your actual experiences. Please advise me on the most beginner-friendly ones.
Disclosure: I cross-posted in G+ community for javascript and HTML5.
Explanation / Answer
Two methods spring to mind (based on experience):
QUnit, originally developed for jQuery and released as a seperate tool in 2008. It has similar semantics than many other unit testing frameworks. This is good for unit testing JavaScript code, as you state.
Selenium. This is great for unit and integration testing of web pages and maybe handy if your JS code relies on a web browser/DOM to be present.
Both tools can be made to work from a command line, so it should be easily possible to integrate in a Jenkins build.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.