/modules
folder)/tests
folder itself<CFParam>
tags in your /tests/runner.cfm
file. If you created a fresh new ColdBox app from our app templates using coldbox create app
, you'll see there are already configuration options ready for you to change. If you are working with an existing test suite runner, place the following lines PRIOR to the <CFInclude>
in your runner.cfm.true
or false
to enable the code coverage feature of TestBox. This setting will default to true
if TestBox detects that you have FusionReactor installed, false
otherwise. Setting this to true
without FusionReactor installed will be ignored./tests/Application.cfc
to make the path dynamic. This is especially useful if the app being tested is in a subfolder of the actual web root. There is nominal overhead in gathering the coverage data from files, so set this to the correct folder and instead of using the whitelist to filter down from your web root if possible..cfc
or .cfm
so there's no need to filter additionally on that unless you want to only include, say, .cfc
files.coveragePathToCapture
setting that further filters what files and folders to track. By default this setting is empty, which means ALL CFML code in the coverage path will be tracked. As soon as you specify at least one file globbing path in the whitelist, ONLY the files matching the whitelist will be tracked.?
to match a single char like /Application.cf?
*
to match multiple characters within a folder or file like /models/*Service.cfc
.**
to match multiple characters in any sub folder (recursively) like /models/**.cfc
.foo
will match any file or folder recursively but a leading slash like /foo
locks that pattern to the root directory so it's not a recursive match./tests/
, but no trailing slash like /tests
would also match a file such as /tests-readme.md
. coveragePathToCapture
setting that is applied on top of any whitelist patterns to prune back folders or files you don't want to track. There's no reason to include a path in the blacklist if you have a whitelist specified and that whitelist already doesn't include the path in question. However, a blacklist can be very handy when you want to include everything but a few small exceptions and it's easier to list those exceptions rather than create a large number of paths in the whitelist./tests/results/coverageReport
but just remember to expand it so it's absolute. The directory will be created if it doesn't exist.