• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF2018 unit test framework

Community Beginner ,
Jun 21, 2020 Jun 21, 2020

Copy link to clipboard

Copied

We have migrated CF11 to CF2018, however the unit tests are no longer working anymore. The error message is shown below. I am wondering if anyone else has the similiar issue.

 

 

The value returned from the getTests function is not of type array.
If the component name is specified as a return type, it is possible that either a definition file for the component cannot be found or is not accessible. The error occurred in D:/Solutions/frst/UnitTests/net/sourceforge/cfunit/framework/TestSuite.cfc: line 133
Called from D:/Solutions/frst/UnitTests/net/sourceforge/cfunit/framework/TestSuite.cfc: line 203
Called from D:/Solutions/frst/UnitTests/net/sourceforge/cfunit/framework/TestSuite.cfc: line 181
Called from D:/Solutions/frst/UnitTests/net/sourceforge/cfunit/framework/TestSuite.cfc: line 102
Called from D:/Solutions/frst/UnitTests/net/sourceforge/cfunit/framework/tester.cfm: line 120
131 : 	<cffunction name="addTest" access="public" returntype="void" hint="Adds a test to the suite">
132 : <cfargument name="test" required="Yes" type="any">
133 : <cfset ArrayAppend( getTests(), ARGUMENTS.test )>
134 : </cffunction>
135 :
Resources:
Browser  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36Remote Address  ::1Referrer  http://localhost/utilities/index.cfm?URL=/unittests/flexible/BuildingBlocks/BaseBBTest.cfc?method=ex...  22-Jun-20 01:48 PMStack Traceat cfTestSuite2ecfc1062722900$funcADDTEST.runFunction(D:/Solutions/frst/UnitTests/net/sourceforge/cfunit/framework/TestSuite.cfc:133) at cfTestSuite2ecfc1062722900$funcADDTESTMETHOD.runFunction(D:/Solutions/frst/UnitTests/net/sourceforge/cfunit/framework/TestSuite.cfc:203) at cfTestSuite2ecfc1062722900$funcADDTESTSUITE.runFunction(D:/Solutions/frst/UnitTests/net/sourceforge/cfunit/framework/TestSuite.cfc:181) at cfTestSuite2ecfc1062722900$funcINIT.runFunction(D:/Solutions/frst/UnitTests/net/sourceforge/cfunit/framework/TestSuite.cfc:102) at cftester2ecfm69696695$funcEXECUTE.runFunction(D:/Solutions/frst/UnitTests/net/sourceforge/cfunit/framework/tester.cfm:120)
coldfusion.runtime.UDFMethod$InvalidReturnTypeException: The value returned from the getTests function is not of type array.
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:507)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:446)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:397)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:370)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:286)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3928)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3908)
at cfTestSuite2ecfc1062722900$funcADDTEST.runFunction(D:\Solutions\frst\UnitTests\net\sourceforge\cfunit\framework\TestSuite.cfc:133)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:552)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:483)
 
 

Views

98

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation