Misc 112 Comments February 24, 2013

TCP Traceroute

Did you know you could traceroute over the TCP protocol?

The regular traceroute usually uses either ICMP or UDP protocols. Unfortunately firewalls and routers often block the ICMP protocol completely or disallow the ICMP echo requests (ping requests), and/or block various UDP ports.

However you'd rarely have firewalls and routers drop TCP protocol on port 80 because it's the web's port.

Check this out. Let's try to traceroute www.microsoft.com using ICMP protocol:

# traceroute -I www.microsoft.com  
traceroute to www.microsoft.com (, 30 hops max, 60 byte packets
 1 (  0.552 ms  0.647 ms  0.742 ms
 2  core1-aggr701a-3.ord1.rackspace.net (  0.415 ms  0.555 ms  0.653 ms
 3  corea.ord1.rackspace.net (  0.707 ms  0.873 ms  0.984 ms
 4  bbr1.ord1.rackspace.net (  1.345 ms  1.341 ms  1.337 ms
 5  * * *
 6 (  3.614 ms  3.747 ms  3.244 ms
 7  xe-0-2-0-0.ch1-96c-2b.ntwk.msn.net (  3.319 ms  4.019 ms  4.010 ms
 8  ge-7-0-0-0.co1-64c-1a.ntwk.msn.net (  53.543 ms  53.105 ms  53.074 ms
 9  xe-5-2-0-0.co1-96c-1b.ntwk.msn.net (  52.942 ms  52.710 ms  52.670 ms
10  * * *
11  * * *
12  * * *
13  * * *

We get lots of * * * and we've no idea how the packets reach www.microsoft.com.

Now let's try UDP traceroute:

# traceroute -U www.microsoft.com
traceroute to www.microsoft.com (, 30 hops max, 60 byte packets
 1 (  0.529 ms  0.599 ms  0.662 ms
 2  core1-aggr701a-3.ord1.rackspace.net (  0.480 ms  0.571 ms  0.658 ms
 3  corea.ord1.rackspace.net (  0.507 ms corea.ord1.rackspace.net (  0.463 ms  0.569 ms
 4  bbr1.ord1.rackspace.net (  1.345 ms  1.322 ms  1.290 ms
 5  * * *
 6  * (  2.697 ms *
 7  xe-0-2-0-0.ch1-96c-2b.ntwk.msn.net (  3.665 ms ge-7-0-0-0.co1-64c-1a.ntwk.msn.net (  53.363 ms  52.597 ms
 8  xe-3-1-0-0.co1-96c-1b.ntwk.msn.net (  52.284 ms  52.643 ms xe-0-1-0-0.co1-96c-1a.ntwk.msn.net (  52.665 ms
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *

Same. Finally let's try traceroute over TCP protocol port 80:

# traceroute -T -p 80 www.microsoft.com
traceroute to www.microsoft.com (, 30 hops max, 60 byte packets
 1 (  0.540 ms  0.629 ms  0.709 ms
 2  core1-aggr701a-3.ord1.rackspace.net (  0.486 ms  0.604 ms  0.691 ms
 3  corea.ord1.rackspace.net (  0.511 ms corea.ord1.rackspace.net (  0.564 ms  0.810 ms
 4  bbr1.ord1.rackspace.net (  1.339 ms  1.310 ms bbr1.ord1.rackspace.net (  1.307 ms
 5  chi-8075.msn.net (  3.619 ms  2.560 ms  2.528 ms
 6  * (  3.640 ms *
 7  ge-7-0-0-0.co1-64c-1a.ntwk.msn.net (  52.523 ms xe-0-2-0-0.ch1-96c-2b.ntwk.msn.net (  3.825 ms xe-1-2-0-0.ch1-96c-2b.ntwk.msn.net (  3.355 ms
 8  xe-0-1-0-0.co1-96c-1a.ntwk.msn.net (  61.042 ms  61.032 ms  60.457 ms
 9  * * xe-5-2-0-0.co1-96c-1b.ntwk.msn.net (  100.069 ms
10 (  53.868 ms  53.038 ms  52.097 ms

A full network path to www.microsoft.com!

There are various different traceroute implementations and if your system doesn't have one that supports tcp protocol, I suggest you either get the new modern implementation of traceroute, or get the tcptraceroute by Michael Toren.

Just a quick update on Browserling. We just launched IE 10s! IE 10s are available to all our paying customers. The free browserling version offers IE 9.

Internet Explorer 10.0.9200.16466

Next we're getting Mac OSX browsers and iPhone emulators. Stay tuned! Follow us on twitter for updates - @browserling, @testling, @substack, @pkrumins.

Try Browserling!

Browserling is an interactive cross-browser testing tool. It lets you test your website in older Internet Explorers such as IE 6, IE 7, IE 8 and IE 9, IE 10, Firefox, Chrome, Opera and Safari!

I thought I'd share this idea I've had for a while and that I want to build in the future. It's a 1:1 teaching network where people meet up and have 1:1 sessions teaching each other things they don't know. I've found that 1:1 teaching sessions are much more effective than a group teaching session or learning on your own. In a 1:1 teaching session you can keep asking the other person questions instantly and infinitely and you can learn really advanced topics really quickly.

Here's an example of how this meetup network would work. Let's say I'm an expert in Python. And let's say you're an expert in Ruby. And let's say you want to master Python and I want to master Ruby. So we schedule a meet up and I teach you Python for a few hours, and you teach me Ruby for a few hours. And we rescheduling meetups whenever we're both available.

The way I imagine it could be built is having a website where you indicate where you're at, what you're a master at, indicate what you want to master, and indicate the time that you've available. The system then matches you with someone and suggests a meetup.

I'd teach and learn and teach and learn forever this way!

There are so many other ideas that I want to build and I'll just keep sharing them in my "ideas for later" blog post series! See ya!

Writing testling-ci tests is super easy. The only thing your test runner needs to do is to produce TAP output on console.log or process.stdout.

Let's create a new node module called testling-ci-test-example and let's add cross-browser tests to it. Once the tests run, you get a badge like this that shows in which browsers your code works:

If you click the badge you go to the test status page.

First, let's create index.js that exports a few functions, some of which work in some browsers and fail in others:

// doesn't work in IE<9
exports.timesTwo = function (list) {
    return list.map(function (x) { return x*2 });

// works everywhere
exports.timesThree = function (list) {
    var ret = [];
    for (var i = 0; i < list.length; i++) {
        ret[i] = list[i]*3;
    return ret;

Now let's write tests for this module. We'll put tests in tests/test.js:

var test = require('tape');
var exampleLib = require('../index.js');

test('timesTwo test', function (t) {
  t.deepEqual(exampleLib.timesTwo([1,2,3]), [2,4,6]);

test('timesThree test', function (t) {
  t.deepEqual(exampleLib.timesThree([1,2,3]), [3,6,9]);

The tests use tape module that console.log's TAP formatted output.

Now let's add testling field to package.json:

"testling" : {
    "files" : "test/*.js",
    "browsers" : {
        "ie" : [ 6, 7, 8, 9, 10 ],
        "ff" : [ 3.5, 10, 15.0, 16.0, 17.0 ],
        "chrome" : [ 10, 20, 21, 22, 23 ],
        "safari" : [ 5.1 ],
        "opera" : [ 10, 11, 12 ]

Finally, let's setup the github hook and point it to git.testling.com. First go to the settings of the repository,

Next, go to the service hooks,

Then, choose WebHook URLs,

Finally, type git.testling.com in the webhook URL field and press update settings,

And we're done. If we visit http://ci.testling.com/pkrumins/testling-ci-test-example we'll see the badge and which browsers the tests succeeded and in which browsers the code failed:

We can instantly see that the code fails in IE6, IE7, and IE8 because these versions of IE don't have Array.prototype.map, and that the code works everywhere else. So awesome!

For more information about testling-ci see ci.testling.com.


About Browserling

Our mission at Browserling Inc is to make the developers' life easier. Follow us on twitter for updates - @browserling, @testling, @substack, @pkrumins.

We at Browserling are proud to announce Testling-CI! Testling-CI lets you write continuous integration cross-browser tests that run on every git push!


There are a ton of modules on npm and github that aren't just for node.js but for browsers, too. However, figuring out which browsers these modules work with can be tricky. It's often that case that some module used to work in browsers but has accidentally stopped working because the developer hadn't checked that their code still worked recently enough. If you use npm for frontend and backend modules, this can be particularly frustrating.

Testling-CI (http://ci.testling.com) is a service for running your browser tests on every commit. Just add a "testling" field to your package.json like this:

"testling" : {
    "files" : "test/*.js",
    "browsers" : {
        "iexplore" : [ "6.0", "7.0", "8.0", "9.0" ],
        "chrome" : [ "20.0" ],
        "firefox" : [ "10.0", "15.0" ],
        "safari" : [ "5.1" ],
        "opera" : [ "12.0" ]

Then add a github webhook for http://git.testling.com and your browser tests will be run on every commit in exactly the browsers you've specified!

Once the tests run you get a badge you can put in your readme with the current browser test status. Here's how it looks:

If you click the badge you go to the test status page.

All your tests need to do is output TAP-formatted text output. Many test harnesses already support this format and the protocol is simple enough that you can just console.log() valid output yourself.

We recommend using tape to output TAP or if you use Mocha, we've a testling-ci example using Mocha. We'll support many more test harnesses later.

Your browser tests can even use node-style require()s bundled with browserify so that you can use exactly the same tests for node and the browser. If your browser tests aren't written the node way you can still run them with the "scripts" field. See testling-ci homepage for full documentation.

This service is free for open source modules published to github. If you want to run this service on your private repos, contact us and we can enroll you in our testling professional edition beta!

For full documentation and more examples visit ci.testling.com!

About Browserling

Our mission at Browserling Inc is to make the developers' life easier. Testling-CI is our third product. Take a look our first two products Browserling and Testling.

Browserling lets you do manual cross-browser testing in all major browsers, such as Internet Explorer 6, 7, 8, 9; Chrome; Safari; Firefox and Opera.

Testling lets you do automated cross-browser JavaScript testing. You write your tests in JavaScript and we run them on the browsers and tell you the results. Testling-CI is built on top of Testling.

We're also soon launching our fourth amazing product. Stay tuned! Follow us on twitter for updates - @browserling, @testling, @substack, @pkrumins.

Important Update:

We've changed goals are we're not launching a fourth product.

We've retired Testling as we built Testling-CI.

All questions about Testling-CI: feedback@browserling.com