First testcase is OK, but failed to run the other cases

Mac OS: 10.10.5
Xcode: 7.1
Appium: 1.4.13
iPhone OS: 7.1.2

I try to run a series of testcases,the first case is always OK, but the others cases, it will restart instruments, and open app on the device, but do not run any cases, again and again.

info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 878fe8aa-2931-4585-945e-9f4f88015a97
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Auto-detecting iOS udid...
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /usr/local/lib/node_modules/appium/com.gemd.iting/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /usr/local/lib/node_modules/appium/com.gemd.iting/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/jenkins/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/usr/local/Cellar/node/0.12.7_1/bin/node","commandProxyClientPath":"/usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. D...ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/jenkins/Library/Application Support/appium/bootstrap/bootstrap-9d04418f1ae68588.js
info: [debug] Reusing dynamic bootstrap: /Users/jenkins/Library/Application Support/appium/bootstrap/bootstrap-9d04418f1ae68588.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog
info: [debug] Creating iDevice object with udid 4xx4a6792xx9f3b8a89aexx4b461f8901xxxfe70
info: [debug] App is installed.
info: [debug] fullReset not requested. No need to install.
info: [debug] Starting command proxy.
info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 4xx4a6792xx9f3b8a89aexx4b461f8901xxxfe70
info: On xcode 7.0, instruments-without-delay does not work, skippinginstruments-without-delay
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 4394a67923a9f3b8a89ae424b461f8901258fe70 com.gemd.iting -e UIASCRIPT "/Users/jenkins/Library/Application Support/appium/bootstrap/bootstrap-9d04418f1ae68588.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-12-01 17:38:16.217 instruments[18717:153301] WebKit Threading Violation - initial use of WebKit from a secondary thread.
warn: Instruments socket client never checked in; timing out (global)
info: [debug] Killall instruments
info: [debug] [INSTSERVER] Instruments exited with code null
info: [debug] Killall instruments
info: [debug] Instruments never checked in
info: [debug] Attempting to retry launching instruments, this is retry #1
info: [debug] Killall Simulator
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 4xx4a6792xx9f3b8a89aexx4b461f8901xxxfe70
info: On xcode 7.0, instruments-without-delay does not work, skippinginstruments-without-delay
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 4394a67923a9f3b8a89ae424b461f8901258fe70 com.gemd.iting -e UIASCRIPT "/Users/jenkins/Library/Application Support/appium/bootstrap/bootstrap-9d04418f1ae68588.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-12-01 17:39:51.162 instruments[18861:154417] WebKit Threading Violation - initial use of WebKit from a secondary thread.

This is successful case, I think it is blocked at “info: Instruments is ready to receive commands”, and instruments also do not launch. but why first case is successful…

    info: [debug] [INST STDERR] 2015-12-02 10:44:29.685 instruments[16065:54159] WebKit Threading Violation - initial use of WebKit from a secondary thread.
    info: Instruments is ready to receive commands
    info: [debug] Instruments launched. Starting poll loop for new commands.
    info: [debug] Setting bootstrap config keys/values
    info: [debug] Pushing command to appium work queue: "target = $.target();\nau = $;\n$.isVerbose = true;\n"

    info: [debug] Socket data received (2 bytes)
    info: [debug] Socket data being routed.
    info: [debug] Sending command to instruments: target = $.target();
    au = $;
    $.isVerbose = true;

I am thinking that is there any chance that you did not quit the Appium driver accordingly? Try to to quit the driver in your teardown() method of each test

I quit driver for each case in teardown() method.

Now I use a new device (iPhone 5, OS 8.4), and there is no problem…so I think it maybe caused by connection or device problem. Anyway it is OK now.

Thank you for your answer^_^