diff --git a/lib/nodejs/test/testAll.sh b/lib/nodejs/test/testAll.sh
index e09c783..4008eec 100755
--- a/lib/nodejs/test/testAll.sh
+++ b/lib/nodejs/test/testAll.sh
@@ -59,6 +59,18 @@
   return $RET
 }
 
+testWSClientServer()
+{
+  echo "   Testing WebSocket Client/Server with protocol $1 and transport $2 $3";
+  RET=0
+  node ${DIR}/http_server.js -p $1 -t $2 $3 &
+  SERVERPID=$!
+  sleep 1
+  node ${DIR}/ws_client.js -p $1 -t $2 $3 || RET=1
+  kill -9 $SERVERPID || RET=1
+  return $RET
+}
+
 
 TESTOK=0
 
@@ -104,4 +116,14 @@
 testHttpClientServer json buffered --promise || TESTOK=1
 testHttpClientServer binary framed --ssl || TESTOK=1
 
+#WebSocket tests
+testWSClientServer compact buffered || TESTOK=1
+testWSClientServer compact framed || TESTOK=1
+testWSClientServer json buffered || TESTOK=1
+testWSClientServer json framed || TESTOK=1
+testWSClientServer binary buffered || TESTOK=1
+testWSClientServer binary framed || TESTOK=1
+testWSClientServer json buffered --promise || TESTOK=1
+testWSClientServer binary framed --ssl || TESTOK=1
+
 exit $TESTOK
diff --git a/lib/nodejs/test/ws_client.js b/lib/nodejs/test/ws_client.js
new file mode 100644
index 0000000..4573246
--- /dev/null
+++ b/lib/nodejs/test/ws_client.js
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//This is the client side test for the standard Apache Thrift
+//"ThriftTest" suite. This client will test any protocol/transport
+//combination specified on the command line.
+
+var fs = require('fs');
+var assert = require('assert');
+var thrift = require('thrift');
+var ThriftTest = require('./gen-nodejs/ThriftTest');
+var ThriftTestDriver = require('./thrift_test_driver').ThriftTestDriver;
+var ThriftTestDriverPromise = require('./thrift_test_driver_promise').ThriftTestDriver;
+
+var program = require('commander');
+
+program
+  .option('-p, --protocol <protocol>', 'Set thrift protocol (binary|json) [protocol]')
+  .option('-t, --transport <transport>', 'Set thrift transport (buffered|framed) [transport]')
+  .option('--ssl', 'use wss instead of ws')
+  .option('--promise', 'test with promise style functions')
+  .parse(process.argv);
+
+var protocol = thrift.TBinaryProtocol;
+if (program.protocol === "json") {
+  protocol = thrift.TJSONProtocol;
+} 
+
+var transport =  thrift.TBufferedTransport;
+if (program.transport === "framed") {
+  transport = thrift.TFramedTransport;
+}
+
+var options = {
+   transport: transport,
+   protocol: protocol,
+   path: "/test"
+};
+
+if (program.ssl) {
+  options.wsOptions = { rejectUnauthorized: false };
+  options.secure = true;
+} 
+
+var connection = thrift.createWSConnection("localhost", 9090, options);
+connection.open();
+
+var client = thrift.createWSClient(ThriftTest, connection);
+
+connection.on('error', function(err) {
+  assert(false, err);
+});
+
+var testDriver = ThriftTestDriver;
+if (program.promise) {
+  console.log("    --Testing promise style client");
+  testDriver = ThriftTestDriverPromise;
+} 
+testDriver(client, function (status) {
+  console.log(status);
+  process.exit(0);
+});
+
+// to make it also run on expresso
+exports.expressoTest = function() {};
