Hey all.
We’re looking to start using TestBox for either TDD or BDD testing but we’re wondering how best to fit TB into our application which has a lot of hard to test code.
Some questions:
- To help test older code, is it OK for the testing to run “within” our application?
Going forward we’ll be looking at writing code that can more easily be tested and have less dependencies, but for now, our tests may need to rely on application setup code.
Are there any problems with running TB inside our application by either removing the Application.cfc files from TB or setting the application name accordingly?
- Do people generally create their own test page or use the runners in TB?
My plan, rightly or wrongly, was to have a structure like this:
app/
app/www/tests/testbox <–<< The TB install
app/www/tests/auto <–<< Automated UI testing
app/www/tests/index.cfm <–<< A page to run all tests including some non-frameworked ones
app/www/tests/lib <–<< A mirror of our components containing their tests
app/lib <–<< Our component library with code to be tested
Visiting http://ourApplication/tests currently results in success or failure of the non-frameworked tests. A status code of 200 or 500 is thrown too so we can test on build (Jenkins fires off a request and checks the response).
My thoughts to expand this was to add TB to this process and continue to pass or fail as above.
- Where are people generally putting their bundles, suites, tests etc?
Here’s hoping I’m not too far off the right track!
Thanks.
Adrian