Luis wrote:
Most likely are you extending from our ColdBox base testing clases?
I can extend whatever I need to make it work.
The original testcase was extending coldbox.system.testing.BaseTestCase but the Testbox wiki page said extending isn’t necessary, so the file is looking like this:
component
{
function setup()
{
Variables.MathsUtils = getController().getPlugin(‘MathsUtils’,true,true);
}
function test_Percent()
{
$assert.isEqual( MathsUtils.Percent(0) , ‘0%’ );
…
}
}
I tried changing the test to testbox.system.testing.BaseTestCase and mxunit complains:
The COMPONENTNAME parameter to the startTest function is required but was not passed in.
That’s from {webroot}/mxunit/framework/TestCase.cfc : line 131 where it is set to testResult.startTest(this); so maybe a bug in mxunit, if it’s not obeying its own contracts?
I created a copy of the BaseTestCase file and changed the mxunit reference in that to the compat folder and then extended this new file, but line 111 fails:
Could not find the ColdFusion component or interface testbox.system.testing.mock.web.MockController.
Because that file doesn’t exist in testbox, it only exists in coldbox, so seems like it’s a bug/missing file in Testbox?
To see what would happen, I copied that one file across from Coldbox (creating appropriate directories), and I now get errors that seem to be Application/Coldbox config related - obviously don’t want to start looking into those without confirming whether this is a valid approach.