Code Coverage is the tool for tracking which part of application code has been executed while posting the transaction. In Microsoft Dynamics NAV it is record by C/AL Code as it displays which specific line of code was executed while performing the activity.
User Can Access the Code coverage tool from Administration–>Application Tools–> Code Coverage
To Start monitoring the activity use need to click on Start button .This will start recording the code coverage activities. Once activities completes then one need to ‘Refresh’ to see the activities.
This code coverage windows will show all the details like
1) Code column will show all the objects executed during the processing of transactions which includes Tables,Pages,Code units,Reports .Once you drill down the on the object you can see which lines of code is executed during processing of transactions.
2) Coverage columns will show How much coverage % is used by the object while processing the transactions
3) Line Type columns will show details like object,Trigger/Function, code etc.
4) Object Type column will show the object type which executed during the transaction processing i.e Table,Codeunit,Page etc
5) Object Id column will show object number of object
6) Line No column will show which line from code written is executed
7) No of Lines Displays Total no of lines of code
8) No of Hits Displays total no of hits for the code is executed during transaction processing
9) No of Hit Lines Display total no of lines executed
10) No of Skipped Lines Displayed total no of skip lines
Code Coverage will display only those object which are executed /touched during the transactions processing.
For specific coverage of any objects you can use ‘Load Objects’ from ribbon area to load the objects and then code coverage will track the activity of that object even though no lines are covered.
You have facility to export the code coverage summary using export option
Important :- Code coverage is recorded globally for all sessions so you have to take care while recording the activity.