Well done. ABLUnit @Ignore

Posted by GregHiggins on 20-Jul-2018 11:58

starting with

@Test. 

procedure test1:

end procedure /* test1 */.

 

@Test.

procedure test2:

end procedure /* test2 */. 

 

With some real test stuff in the procedures, mostly logging.  I tested:

@Ignore. 

@Test. 

 

@Test.

@Ignore. 

 

@Ignore. @Test. 

@Test. @Ignore. 

 

In every case it worked exactly the way I wanted it to, it ignored the test. 

When I removed the first @Test but kept the @Ignore, test2 ran (as desired). The scope of the @Ignore in a Test Procedure is the end of the procedure immediately following. I know this because if the @Ignore is inside a procedure, it has no effect on a following @Test, but it will affect an @Test preceding the enclosing procedure.

 

@Test. 

procedure test1:

@Ignore.

/* test code */

end procedure /* test1 */.  works just fine, it doesn't matter which line the @Ignore is on (but I only tested first and last). 

On the other  hand,

@Test. 

procedure test1:

end procedure /* test1 */. @Ignore.

@Test. 

procedure test2:

end procedure /* test2 */. 

ignores test2. This is all as it should be.  

 

So, well done on the @Ignore. 

All Replies

This thread is closed