У меня есть приложение coldfusion, для которого я хотел бы начать писать модульные тесты.Я нашел testbox и думаю, что это будет отличная библиотека для тестирования.Я следовал инструкциям по установке , но мое приложение Cold Fusion выдает ошибку при попытке запустить мой первый тест.Я скачал zip-файл и вставил его в мой диск C, добавил отображение в мой application.cfc, но он выдает следующую ошибку (см. Ниже).Может кто-нибудь помочь мне отладить, почему он не может найти текстовое поле?
Ошибка
Invalid CFML construct found on line 2 at column 1.
ColdFusion was looking at the following text:
testbox
The error occurred in C:/inetpub/wwwroot/tests/main.cfc: line 2
1 : // Create TestBox object
2 : testbox = new testbox.system.TestBox();
3 : ​
4 : // You can add fluent specs via addDirectory(), addDirectories(), addBundles()
Application.cfc
component {
this.name = "A TestBox Runner Suite " & hash( getCurrentTemplatePath() );
// any other application.cfc stuff goes below:
this.sessionManagement = true;
// any mappings go here, we create one that points to the root called test.
this.mappings[ "/tests" ] = getDirectoryFromPath( getCurrentTemplatePath() );
// Map back to its root
this.mappings[ "/testbox" ] = expandPath( "C:/testbox/" );
// any orm definitions go here.
// request start
public boolean function onRequestStart( String targetPage ){
return true;
}
}
main.cfc
// Create TestBox object
testbox = new testbox.system.TestBox();
// You can add fluent specs via addDirectory(), addDirectories(), addBundles()
testbox.addDirectory( "specs" );
// Run tests and produce reporter results
testbox.run()
// Run tests and get raw testbox.system.TestResults object
testbox.runRaw()
// Run tests and produce reporter results from SOAP, REST, HTTP
testbox.runRemote()
каталог тестовой коробки.