2
I am running unit tests from terminal with below commands. Sometime they executed well, some time not. I am using Xcode 11. Can someone help me 



xcodebuild \
-workspace MyApp.xcworkspace \
-scheme MyScheme \
-configuration Debug \
-sdk iphonesimulator \
-derivedDataPath "BuildBinaryForTest" \
-destination platform=iOS\ Simulator,name=iPhone\ 11 \
clean test | tee xcodebuild.log | xcpretty

I am getting below error

UnitTest:
    MyApp.app (19571) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying error: Test runner exited before starting test execution.))
iKushal
  • 2,689
  • 24
  • 20
  • Does this answer your question? [Test target X encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted](https://stackoverflow.com/questions/34990175/test-target-x-encountered-an-error-early-unexpected-exit-operation-never-finis) – Cristik Jan 19 '20 at 15:27
  • no. It is not happening every time. If I run command five times, I get this error 2 times. 3 times it shows success – iKushal Jan 19 '20 at 15:34
  • @iKushal Did you ever solved this? – laucel Oct 16 '20 at 11:01
  • yes, for me its happening due to launch time. My app's launch time was quite high. So you can create MockAppDelegate for test cases or you can move code from AppDelegate to some other place. – iKushal Oct 21 '20 at 02:20

0 Answers0