Tests for AutobahnJS functionality
Tests run using NodeJS and the nodeunit package.
First, ensure that a Crossbar.io instance is running with the default configuration (use
crossbar init if needed). This will run a WAMP-over-WebSocket transport at
You should be able to use any compliant WAMP router (on
ws://localhost:8080/ws) - your mileage may vary though.
Then, open a terminal and run
npm test in the
- You need to have NodeJS installed.
npm installin the
If all assertions fail, this may be because of different line ending formats for the created test_*.txt files. In this case you need to remove the files and create a known good set of files on your system!
Here is a successful testrun:
oberstet@thinkpad-t430s:~/scm/autobahn/AutobahnJS/package$ npm test > email@example.com test /home/oberstet/scm/autobahn/AutobahnJS/package > nodeunit test/test.js test.js ✔ testConnect ✔ testRpcArguments ✔ testRpcComplex ✔ testRpcError ✔ testRpcOptions ✔ testRpcProgress ✔ testRpcSlowsquare ✔ testRpcRouting ✔ testRpcCallerDiscloseMe ✔ testPubsubBasic ✔ testPubsubComplex ✔ testPubsubOptions ✔ testPubsubExcludeMe ✔ testPubsubExclude ✔ testPubsubPrefixSub ✔ testPubsubWildcardSub ✔ testPubsubPublisherDiscloseMe OK: 25 assertions (9444ms)