How odd. I'm experiencing this same issue precisely as described above and I am also using the else
clause.
Also, I tried the double logging method as mentioned above like so, just before my if
statement to log pass or fail:
UIALogger.logMessage("My Story Title: " + titleDisplayed);
UIALogger.logMessage("Innocuous Message.");
And got a FAIL, which is fine--I wanted anything other than the "Issue
" result and the "script ended without expliciting
" message. So, I then commented //
the second logMessage
statement and re-ran the test and this time got the "Issue
" and "script ended without explicating
" again.
So, his above tip has been verified as real.
I'm running Xcode and Instruments version 4.6 with the iPhone Emulator running as a 6.1 project.
---Update--
I cannot get pass/fail to work properly no matter what I do. On one run I get the enraging "Issue: Script ended without explicating
" message in my log, and then if I make any changes to the script--even if it's just to add an extra whitespace, and save it and then run again--I'll get a good pass or fail result.
But if I then immediately run the test again without any changes at all I'll get the "Issue: Script ended without explicating
" message and this will not go away until I make a meaningless change in the script and save and then run again and then MAYBE at this point I might get a decent pass/fail result (doesn't always happen), but if I run the script again I will get "Issue: Script ended without explicating
" again.
What the heck? I've actually taken the time to reinstall Xcode 4.6 but no luck in getting the behavior to change. I'm profoundly frustrated. This appears to be a bug in Instruments. Is there a way to report this to Apple?
==
test I still see the same behavior. However, if I insert a second innocuous logMessage after the first one then I get the proper pass/fail behavior. I have no idea why that would make a difference but it seems to. Having both if/else condition does make a difference as you mentioned. Going to mark this as answered even though it seems my installation/version is a bit unpredictable. – Mono