diff --git a/test/integration/client/appname-tests.js b/test/integration/client/appname-tests.js
index <HASH>..<HASH> 100644
--- a/test/integration/client/appname-tests.js
+++ b/test/integration/client/appname-tests.js
@@ -66,7 +66,13 @@ test('application_name has precedence over fallback_application_name', function(
 
 test('application_name from connection string', function(){
   var appName = 'my app';
-  var conf = 'postgres:///?application_name='+appName;
+  var conParams = require(__dirname + '/../../../lib/connection-parameters');
+  var conf;
+  if (process.argv[2]) {
+    conf = new conParams(process.argv[2]+'/?application_name='+appName);
+  } else {
+    conf = 'postgres://?application_name='+appName;
+  }
   getAppName(conf, function(res){
     assert.strictEqual(res, appName);
   });
change test to work on travis