02 Extending\Testing - abramadams/dao GitHub Wiki
Resources
Documentation: https://github.com/abramadams/dao/wiki
Chat: The CFML team Slack - Ask questions in the #cfml-general channel and mention @abram.
Extending
Adding database support
Currently there are two databases that are supported: MySQL and MS SQL. Others can be added by
creating a new CFC that implements IDAOConnector.cfc
. The CFC name would then be the "dbtype"
argument passed to the init method when instantiating dao.cfc. So if you have otherrdbs.cfc, you'd
instantiate as: dao = new dao( dbType = 'otherrdbs' );
Running the Tests
To run tests, you'll need CommandBox installed.
Then run box install
once to install the dependencies (TestBox is the only one currently).
Then start a server on port 8500 with your choice of CFML engine, e.g.,
box server start cfengine=lucee@5 port=8500
Now you'll need a database, and to setup a DSN named dao
in the cfml engine's admin (http://localhost:8500/CFIDE/administrator for Adobe CF or http://localhost:8500/lucee/admin/server.cfm for Lucee).
You can then run the tests:
box testbox run verbose=false
If you get any failures, you can run this with more verbose, but still compact output:
box testbox run reporter=mintext