I'd like to start writing some simple test scripts...
# lucee
d
I'd like to start writing some simple test scripts to verify some website functionality after a version update. We are running Lucee 6.2, we all mostly use VS Code, and I have authority over my dev box. I've used mxUnit in the past with Eclipse, but would like to ask if that's the current best practice. Thanks!
z
these days we all use testbox! We use it for all our Lucee stuff We have our lightweight script runner, which we use both locally for testing and via github actions for all of our various lucee projects https://github.com/lucee/script-runner and example of how we running tests on github actions https://github.com/lucee/lucee-data-provider/blob/main/.github/workflows/ci.yml#L49 We have some pretty comprehensive test suites for Lucee, plenty of examples https://github.com/lucee/Lucee/tree/6.2/test We use our own custom runner for testbox For integration tests, https://docs.lucee.org/reference/functions/internalrequest.html is really useful, it let's you call a template as if you called it via http, including running the application.cfc but without any network calls
🙌 2
🙌🏼 1
this is a great example, it uses
internalRequest
to spider all the top level pages in the lucee admin https://github.com/lucee/Lucee/blob/6.2/test/general/AdminPages.cfc
🙌🏼 1
🍺 1