RobotWebTools/roslibjs_integration_tests — pull request #1 by syrnick (2014-06-04 16:47:23+00:00)
Title: RFC for a sample test

This is separate repo version of https://github.com/RobotWebTools/roslibjs/pull/83 . It requires a bit of cleanup before it could be merged. A few issues that need to be fixed before this is mergeable:

1. Having ROS package.xml and javascript package.json in the same place might look confusing.
1. Looks like having package.json at the top level is needed for [this](https://www.npmjs.org/doc/json.html#Git-URLs-as-Dependencies) to work. I wanted to have this package reference "RobotWebTools/roslibjs", but it wouldn't let me do so.
1. grunt jshint doesn't work for tests :(
1. bin/js_runner should be more robust(parse options, output the test results into the XML)
1. bin/js_runner probably could use mocha directly w/o grunt.
1. travis config that runs the tests

There's still a question of using phantomjs v.s. a real browser. phantomjs is nice, but it doesn't support the latest websockets. There're 3 alternatives: fall back to "draft76" for testing (change https://github.com/RobotWebTools/rosbridge_suite/blob/develop/rosbridge_server/src/tornado/websocket.py#L186); use a real browser (e.g. chrome) or try rolling with phantomjs2. I haven't built phantomjs2 yet.

This branch uses chrome for best compatibility.