So I am using the default options for RPGUnit and running all tests.
The RPGUNIT program run from the command line returns the following:
Success. 45 test cases, 131 assertions, 0 failure, 0 error.
Using Run Full coverage gives me the results described previously
(i.e. coverage of only one test case proven by running with
ORDER(*REVERSE) and getting entirely different results, and also that
the lines which are identified as not covered are definitely being
executed during the RPGUnit run)
Using append to previous result just appends the last run onto the
previous, meaning I will have to run code coverage 45 times with
different TSTPRC parameters to determine the full code coverage of the
Unit test program which seems excessive, especially as this program is
quite small (500 lines) the unit tests for larger functions could be a
In my opinion, the code coverage tool should amalgamate the statistics
for all runs of the analysed program called during the batch execution,
into a single report.
I genuinely dont see the code coverage tool being useful otherwise,
apart from verifying that certain parts of code are being executed when
using certain parameters, this can be done easily in debug.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.