Integrating Test Box with FW/1?

Is it possible to integrate Test Box with FW/1? I’ve asked the same question on the FW/1 list, but so far I’ve drawn a blank.

Specifically, I’ve watched a presentation that Luis gave at the beginning of the year on BDD. Here’s a test case he showed:

describe( “User login with valid credentials”, function() {
it( “should see a personalized message”, function() {
userService.login( “luis”, “secret” )
var event = execute( “user.home” )
expect( event.getValue( “welcome” ) ).toBe( “Welcome back luis!” )
})
})

Within FW/1, I suppose the expectation might look more like:

expect( rc.welcome ).toBe( “Welcome to FW/1 TestBox!” )

and perhaps the line above that might look something like:

var rc = execute( “user.home” )

Any initial insight or response would be appreciated.

Nando

Nando,

You can integrate TestBox with any framework or non-framework. However, we have high integration in ColdBox MVC to allow for integration testing virtually. I do not know about FW/1 to comment on it.

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Luis,

Thanks. A follow up question, then. Can the test suite CFCs be located with the application that is being tested? Or must they remain in the TestBox directory structure?

If I’m developing multiple apps, I’m wondering how to keep the test suites organized for each app.

Nando

I would recommend that they execute within another Application.cfc namespace, however, there is nothing stopping you from doing it in the same space.

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano