     runAndSaveApp = (absPath, callback) ->
         appChild = runApp absPath, callback
 
-    stack.add buildApp, null, [absPath, [type, '--with-tests']]
+    stack.add buildApp, null, [absPath, [opts.platform, '--with-tests']]
     stack.add sauceConnectAndSave
     stack.add runAndSaveApp, null, [absPath]
-    stack.add testSauceApp, null, [absPath, type]
+    stack.add testSauceApp, null, [absPath, opts]
 
     stack.runAll (err1) ->
         appChild?.send 'terminate'


        if process.env.NEFT_TEST_BROWSER
            it 'should pass tests on browser', (callback) ->
                runSauceTest 'browser', callback

        if process.env.NEFT_TEST_ANDROID
            it 'should pass tests on android', (callback) ->
                runSauceTest 'android', callback

        if process.env.NEFT_TEST_IOS
            it 'should pass tests on ios', (callback) ->
                runSauceTest 'ios', callback


    return

runSauceTest = (opts, callback) ->
    stack = new utils.async.Stack
    appChild = null
    sauceProcess = null
