Global Bundle Exception instead of reporting a test failure

Hi group,

When all my test pass the reporting goes without errors.
However when a test fails as with this test for example:

function testNotIncludes(){
$assert.notIncludes( “hello”, “hello” );

}

Any idea? With the code above I do get this global bundle exception error:

Global Bundle Exception##

struct
Detail [empty string]
ErrNumber 0
Message Variable SLICETAGCONTEXT is undefined.
StackTrace coldfusion.runtime.UndefinedVariableException: Variable SLICETAGCONTEXT is undefined. at coldfusion.runtime.CfJspPage._get(CfJspPage.java:314) at coldfusion.runtime.CfJspPage._get(CfJspPage.java:298) at coldfusion.runtime.CfJspPage._get(CfJspPage.java:286) at cfBaseSpec2ecfc380776812$funcRUNTESTMETHOD.runFunction(D:\ColdFusion11\cfusion\wwwroot\testbox\system\BaseSpec.cfc:878) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at cfUnitRunner2ecfc1651476749$funcTESTSUITE.runFunction(D:\ColdFusion11\cfusion\wwwroot\testbox\system\runners\UnitRunner.cfc:212) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2819) at cfUnitRunner2ecfc1651476749$funcRUN.runFunction(D:\ColdFusion11\cfusion\wwwroot\testbox\system\runners\UnitRunner.cfc:84) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:643) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:432) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:402) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2483) at cfTestBox2ecfc342353782$funcTESTBUNDLE.runFunction(D:\ColdFusion11\cfusion\wwwroot\testbox\system\TestBox.cfc:414) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2819) at cfTestBox2ecfc342353782$funcRUNRAW.runFunction(D:\ColdFusion11\cfusion\wwwroot\testbox\system\TestBox.cfc:216) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2819) at cfTestBox2ecfc342353782$funcRUN.runFunction(D:\ColdFusion11\cfusion\wwwroot\testbox\system\TestBox.cfc:144) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:643) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:432) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:402) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2483) at cfindex2ecfm186039495.runPage(D:\ColdFusion11\cfusion\wwwroot\unittests\index.cfm:5) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.IpFilter.invoke(IpFilter.java:45) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:495) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:153) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:219) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:450) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:197) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

Can you post the full bundle code

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057

Thanks for the quick respons.

The code of the bundle:

component displayName=“TestBox xUnit suite for CF9” labels=“railo,cf”{

/*********************************** LIFE CYCLE Methods ***********************************/

function beforeTests(){
//application.salvador = 1;
}

function afterTests(){
// structClear( application );
}

function setup(){
//request.foo = 1;
}

function teardown(){
//structClear( request );
}

/*********************************** Test Methods ***********************************/

function testIncludes(){
$assert.includes( “hello”, “HE” );
$assert.includes( [ “Monday”, “Tuesday” ] , “monday” );
}

function testIncludesWithCase(){
$assert.includesWithCase( “hello”, “he” );
$assert.includesWithCase( [ “Monday”, “Tuesday” ] , “Monday” );
}

function testnotIncludesWithCase(){
$assert.notincludesWithCase( “hello”, “aa” );
$assert.notincludesWithCase( [ “Monday”, “Tuesday” ] , “monday” );
}

function testNotIncludes(){
$assert.notIncludes( “hello”, “hello” );
$assert.notIncludes( [ “Monday”, “Tuesday” ] , “Friday” );
}

function testIsEmpty(){
$assert.isEmpty( [] );
$assert.isEmpty( {} );
$assert.isEmpty( “” );
$assert.isEmpty( queryNew("") );
}

}

What version of testbox are you Using?

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057

This seems really familiar like someone else had reported it before. The sliceTagContext function is right there at the bottom of that CFC that the error is happening in so I don’t know why it’s not being found. Are you doing async tests or something that might be running inside of a thread? I’m also curious if changing the sliceTagContext method on line 1141 to be public has any effect on it.

I’d also troubleshoot by catching the error and dumping out the “variables” scope to see what’s in it. (The function SHOULD be there).

Oh, I forgot to add-- what version of ColdFusion are you using? It’s possible this is a bug in an older version of ACF. Our Travis CI tests run against ACF 10, 11, and 2016 as well as Lucee 4 and 5.

https://travis-ci.org/Ortus-Solutions/TestBox

Hi Brad and Luis,

Making the method sliceTagContext public fixed the issue.
I am running CF11 and the latest version via your command line tool.

Thanks for the quick and creative ideas!

Greetings Rene

Ok, so I’m guessing this must be a bug in Adobe ColdFusion then. Can you try putting in a dump of the variables scope where the error was happening? I’m really curious what the variables context contains.