BoxLang 🚀 A New JVM Dynamic Language Learn More...

Lucee File Coverage Debug Template

v0.0.1.13 Lucee Extensions

Lucee File Coverage Extension 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

Getting Started (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".

Prerequisites

  1. Apache Ant to build the project (it is running a simple build.xml file)
  2. Lucee 5.x and greater. No ACF implementation yet.
  3. Currently it is also using the H2 database extension. Which can be installed fropm the Extension:Applications section of the admin.

Installing 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.

  1. Go to the Lucee web administrator - http://localhost/lucee/admin/web.cfm and log in
  2. Click on Applications under Extension
  3. 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
  4. Since we need to use a database to store the captured data, instal the H2 database
  5. Create a datasource called codecoverage using the H2 Database Engine in Embedded Mode
  6. Put a path in the path section (for example "db") and click save
  7. Under Debugging:Settings click "Yes" to enable debugging.
  8. Under Debugging:Templates enter a label such as "CodeCoverage" and select the "File Coverage" template type and click create
  9. 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)
  10. The site is now ready for testing. You just need to browse it. The next part is viewing the results.

Reports 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.

  1. Go to the Lucee web administrator - http://localhost/lucee/admin/web.cfm and log in
  2. Click on Applications under Extension
  3. 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
  4. Since we need to use a database to store the captured data, instal the H2 database
  5. Create a datasource called codecoverage using the H2 Database Engine in Embedded Mode
  6. Put a path in the path section (for example "db") and click save
  7. Under Debugging:Settings click "Yes" to enable debugging.
  8. Under Debugging:Templates enter a label such as "CodeCoverage" and select the "File Coverage" template type and click create
  9. 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)
  10. The site is now ready for testing. You just need to browse it. The next part is viewing the results.

  • Install String
    $ install lucee-file-coverage
  • JVM Argument
    -Dlucee-extensions=lucee-file-coverage
  • No collaborators yet.
         
    • {{ getFullDate("2018-06-27T05:07:46Z") }}
    • {{ getFullDate("2018-06-27T06:20:18Z") }}
    • 2,596
    • 2,671