This extension provides a debugging template that logs all the calls to script files as a user navigates your site. It then allows you to browse which files have been used and more importantly which have not
(We are hoping this will go onto the lucee extension store in the future).
Check out the installation guide. At the moment this is the main way of installing it until we get this everything ready to be added to the Lucee Extension "store".
I would love to be able to actually add this to http://forgebox.io too.
- Apache Ant to build the project (it is running a simple build.xml file)
- Lucee 5.x and greater. No ACF implementation yet.
- Currently it is also using the H2 database extension. Which can be installed fropm the Extension:Applications section of the admin.
First you need to build the project, simply go into the root and run:
ant
This will create a file in the dist
folder called filecoverage-extension-X.X.X.X.lex
. This extension is meant to deployed to a web context (versus a server context) as it installs the reporting application into your webroot in a folder called /filecoverage
so you can access it as http://localhost/filecoverage.
- Go to the Lucee web administrator - http://localhost/lucee/admin/web.cfm and log in
- Click on
Applications
under Extension - Scroll to the bottom to where it says "Upload new extension (experimental)" and choose the
filecoverage-extension-X.X.X.X.lex
we created and click Upload - Since we need to use a database to store the captured data, instal the
H2
database - Create a datasource called
codecoverage
using the H2 Database Engine in Embedded Mode - Put a path in the path section (for example "db") and click save
- Under Debugging:Settings click "Yes" to enable debugging.
- Under Debugging:Templates enter a label such as "CodeCoverage" and select the "File Coverage" template type and click create
- In the Datasource Name field enter 'codecoverage' and click submit ( you can also then limit to which IP ranges you want this debugging template to work with)
The site is now ready for testing. You just need to browse it. The next part is viewing the results.
At the moment this is pretty rough and ready and you just need to go to http://localhost/filecoverage to view how many hits each file gets as well as some information on which functions/methods are used in a CFC.
This extension should NOT be deployed on a live system. It's meant to be used as part of an investigation or your testing process. DO. NOT. RUN. ON. A. LIVE. SYSTEM. You have been warned.
We use SemVer for versioning.
- Mark Drew - Initial work - cybersonic
This project is licensed under the MIT License - see the LICENSE file for details