How to use TestNG to effectively use the new SkipException () ? Does anyone have an example?
I tried to throw this exception at the beginning of the test method, but it blew up the gap, setup, methods, etc., and has collateral damage, also causing several (not all) subsequent tests to be skipped, and showing a bunch of garbage in the TestNG HTML report.
I use TestNG to run my unit tests, and I already know how to use the parameter for @Test annotation to disable the test. I would like my test to appear as "existing" in my report, but not counting it in the end result. In other words, it would be nice if there was an @Test annotation option to βskipβ the test. This means that I can mark the tests as ignored by sortof without checking the test from the list of all tests.
Does a βSkipExceptionβ need to be thrown at @BeforeXXX before running @Test? This may explain the strangeness I see.
exception unit-testing testng testing
djangofan
source share