Sponsor

2011/11/08

Announcing Headless Testling - good coders code, great reuse

Announcing Headless Testling - good coders code, great reuse


Announcing Headless Testling

Posted: 07 Nov 2011 06:22 AM PST


We're happy to announce Headless Testling. Headless Testling lets you run your JavaScript tests locally through jsdom and remotely with Testling.

We put headless testling on npm so installing it is as easy as:

 npm install -g testling 

And now you can run your tests locally!

 $ testling test.js  

Or run them on real browsers by specifying --browsers argument:

 $ testling test.js --browsers=iexplore/7.0,iexplore/8.0,firefox/3.5 

For example, if your test.js is this:

var test = require('testling');  test('json parse', function (t) {     t.deepEqual(JSON.parse('[1,2]'), [1,2]);     t.end(); }); 

Then running testling headlessly you'll get the following output:

 node/jsdom                      1/1  100 % ok 

But running it with --browsers=iexplore/7.0,iexplore/8.0,firefox/3.5, the test will get executed on native IE7, IE8 and Firefox 3.5:

 Bundling...  done  iexplore/7.0        0/1    0 % ok   Error: 'JSON' is undefined     at [anonymous]() in /test.js : line: 4, column: 5     at [anonymous]() in /test.js : line: 3, column: 29     at test() in /test.js : line: 3, column: 1    > t.deepEqual(JSON.parse('[1,2]'), [1,2]);  iexplore/8.0        1/1  100 % ok firefox/3.5         1/1  100 % ok  total               2/3   66 % ok 

You can follow the development of headless testling at testling's github repo.

Follow the founders of Browserling on GitHub, Twitter, Plurk, Google+ and Facebook!

And subscribe to my blog for Browserling announcements and all kinds of other awesome blog posts!

No comments:

Post a Comment

Keep a civil tongue.

Label Cloud

Technology (1464) News (793) Military (646) Microsoft (542) Business (487) Software (394) Developer (382) Music (360) Books (357) Audio (316) Government (308) Security (300) Love (262) Apple (242) Storage (236) Dungeons and Dragons (228) Funny (209) Google (194) Cooking (187) Yahoo (186) Mobile (179) Adobe (177) Wishlist (159) AMD (155) Education (151) Drugs (145) Astrology (139) Local (137) Art (134) Investing (127) Shopping (124) Hardware (120) Movies (119) Sports (109) Neatorama (94) Blogger (93) Christian (67) Mozilla (61) Dictionary (59) Science (59) Entertainment (50) Jewelry (50) Pharmacy (50) Weather (48) Video Games (44) Television (36) VoIP (25) meta (23) Holidays (14)

Popular Posts (Last 7 Days)