[TestBox 4.5.0] How to Skip Test Bundles

How do you skip test bundles when using the TestBox browser or runner.cfm? The documentation says you can add an annotation to the component being tested, but for some reason, it’s not working for me. Perhaps I’m missing something obvious?

Here’s what a sample bundle looks like:

component 
   extends="coldbox.system.testing.BaseTestCase" 
   skip="true" 
{

   function run(){

      describe( "My Test Suite", function(){

         it( "can save the world", function(){
            expect( false ).toBeTrue();
         } );

      } );

   }

}

In the ColdBox Browser, I select, “run all”, but the bundle executes anyway. I also get the same behavior from executing /tests/runner.cfm.

I then went a little overboard and added the annotation to the describe() and it() functions:

describe( "My Test Suite", function() skip="true" {

     beforeEach( function( currentSpec ){
        setup();   
     } );

     it( "can save the world", function() skip="true" {
         expect( false ).toBeTrue();
     } );

} );

Both the TestBox browser “Run All” and runner.cfm still executed the bundle.

Note: I tested this with ACF 2018 (latest).

I’ve never used inline functions with annotation that way.

But the way to do what you want is described here

Using your example code

describe( title="My Test Suite", body=function() {

    beforeEach( function( currentSpec ){
        setup();
    } );

    it( title="can save the world", body=function()  {
            expect( false ).toBeTrue();
    }, skip="true" );

},  skip="true" );

Hope that helps

1 Like

Thanks, @fingersdancing. You are correct!
I was looking at the wrong documentation page and was reading the XUNIT primer instead of the BDD one.