Announcing Testling - Automated Cross-Browser JavaScript Testing - good coders code, great reuse |
| Announcing Testling - Automated Cross-Browser JavaScript Testing Posted: 24 Oct 2011 11:17 AM PDT We have amazing news at Browserling. We just launched a new product called Testling! Testling is automated cross-browser JavaScript testing tool. You write the JavaScript test, and we run it on all the browsers behind the scenes and report the results. It's super easy to use. All you need is var test = require('testling'); test('json parse', function (t) { t.deepEqual(JSON.parse('[1,2]'), [1,2]); t.end(); }); And now do this: curl -sSNT test.js testling.com/?browsers=iexplore/7.0,iexplore/8.0,chrome/14.0 This will run the JSON test in Internet Explorer 7, Internet Explorer 8 and Chrome 14. It's well known that IE7 does not have a Here is the output: 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 chrome/14.0 1/1 100 % ok total 2/3 66 % ok It precisely shows what the error was on IE7 - Testling supports all the major browsers:
When you run a test, you can specify, which browsers to run tests on via the curl -sSNT test.js testling.com/?browsers=iexplore/6.0,opera/11.0,safari/5.1 You can script interactions with websites, too. Here is an example that uses jQuery to submit a login form and compare the greeting text: var test = require('testling'); test('testling login test', function (t) { t.createWindow('http://www.testling.com/test-form/', function (win, $) { t.plan(1); var form = $('#form')[0]; $('input[name=login]').val('testling'); $('input[name=passw]').val('qwerty'); t.submitForm(form, function (win, $) { t.ok($('#welcome p:first').text() === "Login successful.", "login failed"); t.end(); }); }); }); Submitting a form only works in IE8, IE9, Chrome 7-14 and all Firefox browsers. Opera, IE6 and IE7 can't do that yet because of implementation limitations, but we're solving this problem right now. See Testling documentation for a detailed information how to write tests! 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! |
| You are subscribed to email updates from good coders code, great reuse To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
| Google Inc., 20 West Kinzie, Chicago IL USA 60610 | |
No comments:
Post a Comment
Keep a civil tongue.