Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the trivial-coverage Reference Manual, version 0.0.4, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 06:02:47 2022 GMT+0.
Next: Systems, Previous: The trivial-coverage Reference Manual, Up: The trivial-coverage Reference Manual [Contents][Index]
A simple Common Lisp library to print out the code coverage collected. Supports SBCL and CCL.
This project is available in the latest QuickLisp distribution, so installing it is reduced to calling:
(ql:quickload :trivial-coverage)
But if you want access to the latest updates, install it by cloning the Git repository with
cd $HOME/quicklisp/local-projects
git clone https://gitlab.com/ediethelm/trivial-coverage.git
and then loading it as usual via QuickLisp as above.
Assuming there is a system being tested and named :system-under-test, which has three files that should not be included in the coverage calculation. The following expression loads the system, executes the tests and reports the total coverage:
(trivial-coverage:test-and-print-coverage :system-under-test
:exclude '("test-system-under-test.lisp"
"test-data-generator.lisp"
"documentation.lisp"))
To access the coverage value programatically the following is possible:
(declaim (optimize sb-cover:store-coverage-data))
((asdf:oos 'asdf:load-op :system-under-test)
(let ((report-path (merge-pathnames "coverage-report/" (asdf:system-source-directory :system-under-test))))
(sb-cover:reset-coverage)
(asdf:oos 'asdf:test-op :system-under-test)
(sb-cover:report report-path)
(get-coverage report-path :exclude exclude))
[function] TEST-AND-PRINT-COVERAGE SYSTEM &KEY EXCLUDE KEEP-REPORT (STREAM T)
Loads and tests the given system collecting coverage information. Also prints a line containing the coverage to stream.
system - name of the system to be tested
exclude - files to be excluded from the calculation
keep-report - if NIL, the generated HTML coverage files are removed
stream - the stream to which the coverage result shall be written
[function] GET-COVERAGE REPORT-PATH &KEY EXCLUDE
Calculates the total code coverage reported by sb-cover (via the HTML report) and returns this value.
report-path - the path to the directory containing the HTML coverage report
exclude - files to be excluded from the calculation
This library is released under the MIT License. Please refer to the LICENSE to get the full licensing text.
Please refer to the CONTRIBUTING document for more information.
Next: Files, Previous: Introduction, Up: The trivial-coverage Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
A simple Common Lisp library to print out the code coverage collected. Supports SBCL and CCL.
Eric Diethelm <ediethelm@yahoo.com>
MIT
0.0.4
lquery (system).
Next: Packages, Previous: Systems, Up: The trivial-coverage Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: trivial-coverage/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
trivial-coverage (system).
Next: trivial-coverage/trivial-coverage.lisp, Previous: trivial-coverage/trivial-coverage.asd, Up: Lisp [Contents][Index]
trivial-coverage (system).
Previous: trivial-coverage/package.lisp, Up: Lisp [Contents][Index]
trivial-coverage (system).
Next: Definitions, Previous: Files, Up: The trivial-coverage Reference Manual [Contents][Index]
Packages are listed by definition order.
A simple Common Lisp library to print out the code coverage collected by sb-cover. As such it only supports SBCL.
common-lisp.
Next: Indexes, Previous: Packages, Up: The trivial-coverage Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Previous: Public Interface, Up: Public Interface [Contents][Index]
Calculates the total code coverage reported by sb-cover (via the HTML report) and returns this value.
*report-path* - the path to the directory containing the HTML coverage report
*exclude* - files to be excluded from the calculation
Loads and tests the given *system* collecting coverage information. Also prints a line containing the coverage to *stream*.
*system* - name of the system to be tested
*exclude* - files to be excluded from the calculation
*keep-report* - if NIL, the generated HTML coverage files are removed
*stream* - the stream to which the coverage result shall be written
Previous: Public Interface, Up: Definitions [Contents][Index]
Previous: Definitions, Up: The trivial-coverage Reference Manual [Contents][Index]
Jump to: | C D E F G P T |
---|
Jump to: | C D E F G P T |
---|
Jump to: | F P S T |
---|
Jump to: | F P S T |
---|