Hello Everybody,
For a long time I have no single guess that it is possible to catch the error from the assertTrue(false) very simply.
Yep, it is possible. Saneesh Joseph has opened my eyes!
Sample snippet:
try {
assertTrue("Catch me if you can!", false);
} catch(Error er) {
Log.i(er.toString());
}
Thanks, Saneesh Joseph!
Happy testing, folk! (:
Best regards,
Yahor
Wednesday, September 21, 2011
Android Instrumentation, catch assertation error
Labels:
Android,
Android testing,
assert,
handle solo error,
solo
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment