Simple Unit Testing Question on TestSuite Creation.

What do I need to make this work. I am sure I am doing something simple wrong. Thanks for any help.

component extends=“coldbox.system.testing.BaseTestCase” appMapping="/awng" displayname=“AllTests” output=“false” hint=“Test suite for test cases.”
// Test Suite

public void function suite() output=“false”
testSuite = CreateObject(“component”,“mxunit.framework.TestSuite”).TestSuite();
//Add all runnable methods in LoginTest

results =;


How are you calling this?

If it is via the mxUnit in Eclipse, then you need to read the documentation a little closer. In other words, the eclipse views don’t support suites.

If this is not how your are running your tests, then maybe you can provide a bit more information on how your are calling this?

Okay, I thought you could call a testsuite from eclipse (ColdFusion Builder 2) I have everything else working I think.

I saw in the ColdBox documentaiton -

ColdBox Test Suites

So now that you completed your incredible unit test, you can also create testing suites. The Application Template comes with a pre-coded testing suite to cover the two test cases: generalTest.cfc and mainTest.cfc. So below you can see the code for the test suite for cfcunit:

**<cfcomponent** displayname="AllTests" output="false" hint="Test suite for test cases.">  
	**<cffunction** name="suite" returntype="org.cfcunit.framework.Test" access="public" output="false">  
		**<cfset** var suite = CreateObject("component", "org.cfcunit.framework.TestSuite").init("Test Suite")>  
		<---  Add the test cases --->
		**<cfset** suite.addTestSuite(CreateObject("component", "cases.generalTest"))>
		**<cfset** suite.addTestSuite(CreateObject("component", "cases.mainTest"))>
		**<cfreturn** suite/>  


Here is the test suite for mxunit:

testSuite = CreateObject("component","mxunit.framework.TestSuite").TestSuite();
//Add all runnable methods in MyComponentTest  

results =;  

All this does is add the two test cases we created to the suite. We can then test all of them at once via cfcUnit or test the entire directory via mxunit.

So I thought that was a CFC called from Eclipse.