开发者

Does RhinoJS support the websockets API?

I have been using Jasmine to write BDD tests for a web app. I am interested in running these same tests from the command line using Rhino, and I found this blog entry which has been very helpful. However; my app uses pusher, which offers a simple API for passing events between clients using web sockets.

My tests run fine from a browser, but running them via Rhino fails to connect to p开发者_JS百科usher. Pusher offers a debug stream, and it would show authentication errors or other failures, but it doesn't register any activity when I run my tests from the command line.

This may be a simple yes or no answer, but I haven't been able to locate any relevant documentation, and I'm brand new to Rhino so I apologize if this is a total n00b question.

My question

As the title says, does anyone know if Rhino supports the websockets API? Am I doing something else wrong here, or will scripts that rely on websockets simply not work via Rhino?

My overall goal was to use my already written jasmine tests as stress tests by running them on several EC2 instances at once; is there a good (simple?) way to do this while reusing my existing javascript tests, or should I suck it up and just write my stress tests in a server side scripting language? I am aware of selenium grid, but was hoping to avoid having to spawn new browsers to run these tests, if possible.

Thanks so much!


Ringo, a Rhino-based CommonJS runtime supports them: http://ringojs.org/api/v0.6/ringo/webapp/websocket/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜