nl_tokens: Start the Sauce Connector . Returns childProcess object .
pl_tokens: function startConnector ( username , apiKey , exitCb ) { var jarPath = process . env . SAUCE_JAR || path . join ( __dirname , "thirdparty" , "Sauce-Connect.jar" ) var jcmd = "java" var jargs = [ "-Xmx64m" , "-jar" , jarPath , username , apiKey ] var screencmd = "java -Xmx64m -jar " + jarPath + " [USERNAME] [API KEY]" ctx . comment ( "Starting Sauce Connector" ) var opts = { cwd : ctx . workingDir , cmd : { command : jcmd , args : jargs , screen : screencmd } } connectorProc = ctx . cmd ( opts , exitCb ) // Wait until connector outputs "You may start your tests" // before returning connectorProc . stdout . on ( 'data' , function ( data ) { console . log ( ">>" , data ) ; if ( / Connected! You may start your tests. / . exec ( <mask> ) !== null ) { console . log ( ">> STRIDER-SAUCE :: TUNNEL READY" ) return cb ( null , true ) } } ) }