Jump to navigation Jump to search


147 bytes added, 11:55, 15 December 2015
* Implement a coverage tool for collecting coverage data and generating code coverage reports on m-file functions and scripts. This would be very useful for Octave development as well as for users who want a code coverage report for their own functions and scripts.
We are far from even having one test for every function, so focus should be on getting the breadth of coverage first before trying to get the depth of 100% statement coverage. As of Jan 2014Dec 2015, 243 202 of 834 1020 m-files have no tests. Some of these will be plotting functions which have demos instead, but that leaves enough functions to be an interesting project. As of Dec 2015, there are 485 instances of C++ functions which need tests.
After Octave is compiled, running the {{Codeline|make check}} build target will run the full test suite and generate a file called test/fntests.log in the build directory with a summary of the results. At the end of the file is a list of all functions for which no tests were found. An extract is posted in the [[files missing tests]] page. If you are not building Octave yourself, the test suite can be run on an installed binary copy by executing the {{Codeline|__run_test_suite__}} command at the Octave prompt. The fntests.log file will be written in the current directory in this case.
There also need to be tests for functions written in the C++ files, . See [[Add_BIST_tests_for_octave_functions_written_in_C%2B%2B]] for instructions and that is a whole other projectlist of instances.
See also [[Continuous Build#Coverage Report]].


Navigation menu