5 ms·
Unit Testing 101: Are You Testing Your JavaScript?
- deleted 16y ago[deleted]
- bwindels 16y agoA blog post on MSDN promoting the use of google and java software (JsTestDriver) and not even mentioning visual studio, times have changed indeed.
- ch0wn 16y agoI might be wrong, but those scrollbars in the screenshot look a lot like Ubuntu's.
- akavlie 16y agoYep, you're right! The author works for Gitorious too. Despite the fact that this is a Microsoft blog, the content is about the furthest you can get from MS-centric development. Everything he endorses is open source, from sources other than Microsoft. It's kind of amazing.
- cjohansen 16y agoActually it's Linux Mint 10, but same Gnome setup :) (Also, Mint is just a slightly different wrapper on top of Ubuntu).
- DanielRibeiro 16y agoJasmine is also a great framework for testing. It work headless (nodejs) and on web (for those rare times you want to debug a test): http://pivotal.github.com/jasmine/ http://pivotal.github.com/jasmine/
- trungonnews 16y agoagree
- fish2000 16y agoRelatedly: what is with MSDN bloggers always referring to themselves as 'junkies'? A "script junkie" probably won't steal their mother's VCR and pawn it so they can get more scripts to stick in their arm. It's kind of a bizarre convention.
- nestlequ1k 16y agoJunkie has several different meanings: http://en.wikipedia.org/wiki/Junkie http://en.wikipedia.org/wiki/Junkie
- deleted 16y ago[deleted]
- rst 16y agoAnother option is the test framework used for jQuery itself, QUnit: http://docs.jquery.com/Qunit http://docs.jquery.com/Qunit
- augustl 16y agoI prefer JsTestDriver to any other JS test framework out there, for two reasons: 1. You get feedback in your terminal 2. It scales better - run in multiple browsers with one command, output results in junit XML for CI tools, etc.
- trungonnews 16y agoi believe you can make jsTestDriver to work with any other test framework such as jamine js.
- mckoss 16y agoVery nice summary of testing best practices - and surprisingly not Microsoft specific!
- trungonnews 16y agoif anyone didn't notice. that article is hosted by Microsoft. since when did they develop on firebug, use open source tools, and hudson ci? and practice TDD?
- augustl 16y agoThe author of that post is a guest author. I think most of the authors on that blog are.
- MartinCron 16y agoIt always annoys me when people talk about test automation (TDD, unit testing, whatever) in the context of "finding bugs". Test automation is about preventing bugs.
- cjohansen 16y agoTest automation is about preventing bugs, sure. And TDD is about software design. I don't disagree. However, unit testing is also a nice way to find bugs. In any case, "trapping" a bug like I did in this article is often an effective way of introducing newcomers to what a unit test is.
- MartinCron 16y agoIt was a good article. And using automated tests to trap and isolate problems is an important technique. I didn't mean my nit-picking to come across as harsh and dismissive. I just get hung up on people talking about writing tests to find bugs, because if that's all it is about, manual testing is generally faster in the short-run.