Using Assumptions, I can add a bit more meaning to my tests, but when assumption is false, the tests errors out instead of failing (which is better of course). I wonder, is there a way to skip the test altogether when that happens?
For example, when i am offline, test makes no sense and adds no meaning. I would like to recognize the fact that i am offline and not run the test at all. So, no fail()
, no pass()
, pretend that this test does not even exists.
AppConnector appConn = new AppConnector(url, RequestType.POLL);
Assume.assumeTrue(appConn.connect());
try {
// stuff
} catch (Exception e) {
fail();
}