Testbox 2.1 - Skip an entire directory or CFC file

84 views Asked by At

We want to create a HelperUtility.cfc with common methods for our tests to use. If we put the file in /tests/lib/HelperUtility.cfc, can we tell TestBox, don't try running any tests in /tests/lib? If not, can we add something to the component tag to skip the entire file, rather than adding skip to all the methods in the component individually?

1

There are 1 answers

0
sfitsos On

There's no way to do that unfortunately. I have tried to skip some manual mocks that were created inside a tests/mock folder, but you cannot configure TestBox at runtime to skip a specific folder if you decide to run the tests for a parent folder.

The only work around that worked for me was to create a specs subfolder in the parent tests and then call the testbox runner with a directory argument of the specs... For example: http://localhost:8500/testbox/system/runners/HTMLRunner.cfm?directory=tests.specs