Quantcast

Weird inconsistent SkipException behaviour

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Weird inconsistent SkipException behaviour

Robert Krüger
Hi,

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.

Example:

    @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

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Loading...