This is usually what you want when testing a device: if it fails anyway, do it quickly. That is, a crash on the first problem in each test function. In addition, later tests usually involve earlier tests, for example, if the page title is incorrect and says 404, there is no exact test that the page will display the correct number of images.
I assume that you want this to get more information in the test results, and one way to do this would be to use a single statement and a custom error message:
var title = this.getTitle(); var linkText = this.getHTML('a#testLink'); this.assert( title == "MyPage" && linkText == "continue", "title=" + title + ";a#testLink = " + linkText);
But it can get messy. If you want to use the full power of the assert family of functions, rather than throw them away, and instead continue to study the source code , this may work:
test.assert(false, null, {doThrow:false} ); test.assertEquals(1 == 2, null, {doThrow:false} ); test.assertEquals(2 == 2);
And if you want this to be the default in all your statements, well, cracking the code might be the best choice! (Change the default value of true for doThrow to false .)
source share