[xctest] Check for an error message prefix only
Checking the whole message is fragile and might break should the
formatting change ever so slightly.
Fixes: <rdar://problem/46030955>
(cherry picked from commit 74c2da4c4b313fa660dc7b2fb43e74e83df90a15)