Sometimes you will need to produce output from your tests and you can do so elegantly via some functions we have provided that are available in your test bundles:
These are great little utilities that are needed to send output to several locations from within your tests.
Hint: Please note that the
debug()method does NOT do deep copies by default.
console( myResults );
debug( myData );
debug( myData, true );
debug( var=myData, top=5 );
print( "Running This Test with #params.toString()#" );
println( "Running This Test with #params.toString()#" );
Sometimes you need to dump something that is in the CFC you are testing or maybe an asynchronous test. The aforementioned methods are only accessible from your test bundle, so getting to the TestBox output utilities is not easy.
Since version 4.0 we have implemented the testing utilities into the
request.testbox.Which will give you access to all the same output utilities:
request.testbox.console( "I am here" )
request.testbox.debug( "why is this not running" )