Skip to content

Running Unit Tests

Tom King edited this page Jun 9, 2018 · 1 revision

Some basic unit tests are provided, hopefully as a starting point for your own.

Running the Tests via GUI

Debug Footer

When running in Development mode, you should be able to see the CFWheels debug footer at the bottom of the page. Simply click Run Tests to run the tests immediately, or View Tests to select by individual package.

Tests Select

If a test fails, it will be highlighted in Red. You can filter the results quickly by pressing the "Failed" button to just show those tests

Failed Tests

Running the Tests via CLI

If you've got the CFWheels CLI installed in Commandbox, you can run the tests via command line. First, ensure the local server is running (run start if it isn't) and then run:

$ wheels test

Note, you will need to run this command from the root of the CFWheels installation (which applies to all wheels commands). You should get an output similar to below:

CLI tests 1

If you require a bit more information on exactly which tests have run, you can run the command with the debug=true flag.

$ wheels test debug=true
Clone this wiki locally