Unit Testing 101: Are You Testing Your JavaScript?(msdn.microsoft.com)
msdn.microsoft.com
Unit Testing 101: Are You Testing Your JavaScript?
http://msdn.microsoft.com/en-us/scriptjunkie/gg655487.aspx
9 comments
A blog post on MSDN promoting the use of google and java software (JsTestDriver) and not even mentioning visual studio, times have changed indeed.
I might be wrong, but those scrollbars in the screenshot look a lot like Ubuntu's.
Yep, 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.
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.
Actually it's Linux Mint 10, but same Gnome setup :) (Also, Mint is just a slightly different wrapper on top of Ubuntu).
Jasmine 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/
agree
It 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.
Test automation is about preventing bugs.
Test 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.
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.
It 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.
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.
Relatedly: 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.
Junkie has several different meanings: http://en.wikipedia.org/wiki/Junkie
[deleted]
Another option is the test framework used for jQuery itself, QUnit: http://docs.jquery.com/Qunit
I 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.
i believe you can make jsTestDriver to work with any other test framework such as jamine js.
Very nice summary of testing best practices - and surprisingly not Microsoft specific!
if 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?
since when did they develop on firebug, use open source tools, and hudson ci? and practice TDD?
The author of that post is a guest author. I think most of the authors on that blog are.
[deleted]