[Testbox] handling errors outside of tests

13 views
Skip to first unread message

pri...@thecrumb.com

unread,
Feb 1, 2018, 4:25:14 PM2/1/18
to ColdBox Platform
Working on getting tests written for our application.

One issue I've run into - for some of our apps we have a slight disconnect in our process in that a script will need to be run to setup a new table for example (no ORM). The developer will script the table, and write a test and everything works great on their computer :)

But if someone else runs that test it will fail since they don't have that table with a not very helpful error.

     coldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error Executing Database Query

Is there some way I can provide better error handling for issues outside of my tests?

I'm just using the basic run() within my index.cfm

<cfset testbox = new testbox.system.TestBox( directory={ mapping=url.directory, recurse=url.recurse} )>
<cfoutput>#testbox.run( reporter=url.reporter )#</cfoutput>


Thanks!
Jim


Luis Majano

unread,
Feb 1, 2018, 4:26:54 PM2/1/18
to ColdBox Platform
Hi Jim,

Here is my opinion.

Have you considered maybe using the command box-migrations module?


Luis Majano
CEO
Ortus Solutions, Corp
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/c8fe2d1d-47f6-420d-892c-550d1481ca0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages