I've been using SkipException for a long time to disable tests programmatically (e.g. depending on platform or other environment conditions) but now I have run into a few cases where the SkipException makes the test fail instead of be skipped and I do not see the difference.
@Test
public void testOSVersionAtLeast() {
//FIXME: FND-317
if (SystemInfo.isLinux())
throw new SkipException("Skipping on linux until FND-317 is resolved");
if(SystemInfo.isWindows()){
// FIXME win
throw new SkipException("Skipping on windows until TODO is resolved");
}
...
this works while in another class
@Test
public void moveItemCaseChangeOnlyTest() throws Exception {
// FIXME WIN fails because of ...
if(SystemInfo.isWindows()){
throw new SkipException("Disabled due to error");
}
...
causes a failure.
In both cases code tests are executed using Idea's TestNG plugin on Windows.
What am I missing?
Thanks in advance,
Robert