Posts

Showing posts with the label Framework

JavaScript Test Framewors: more than 30 + 1

After @szafranek hint and suggestion, wru landed almost at the end of this Wikipedia List of unit testing frameworks page. If you use this tweet size hand made imperfect script in the wikipedia page console: a=q="querySelectorAll",[].map.call(document[q](".mw-headline,.wikitable"),function(v,i){i%2?a=v.textContent:o[a]=v[q]("tr").length},o={}),o You gonna see that JavaScript is third when it comes to number of test frameworks ... and not sure that's good, anyway, here a quick description of mine. About wru You can find most info in github page itself but essentially wru is a generic purpose, environment agnostic, JavaScript tests framework compatible with both client and server, where client means every bloody browser, and server means Rhino, node.js, and recently phantom.js too. To be really fair, wru is not exactly a unit test framework since it does not provide by default anything related to mocks or stubs. However, wru is so tiny and unobtru...

wru, unit tests have ever been that easy

Do you remember my good old wru project ? It has been refactored , readapted for both client and server side environment such node.js and Rhino and, most important, it landed in github ;) Please spend few minutes to read the documentation and you'll realize why I chose this title for this post. Have fun with JavaScript Unit Tests!

wru against wru: version 1 ready

Image
This shot has been token on 13th September 1923, when W.H. Murphy demonstrated the efficiency of his bulletproof vest, the one that sold later to NY Police Department. Above image has been historically used for different topics and the current one is " how much we trust what we sell ". Do You Trust Your UT Framework? I wasn't kidding that much when I wrote about " test the testing framework " in my precedent wru post . The overall Unit Test Frameworks code coverage is poor , specially those with all the magic behind the scene, magic that does not come for free. Use The Framework Itself To Test The Framework This is a common technique that may result in a reliability deadlock . If we trust our UT Framework and we use it to test itself, the moment we have a problem with the framework we'll never know ... or even worst, it will be too late. Don't Trust "Magic" Too Much If the framework is simple and it does not pollute each test with any sort of ...