It is very urgent to me to get the answer of it.
I didn't read the required documents before posting into this forum.
please answer of my question if you know except commenting on it.
Logging Code Coverage
The Code Coverage tool enables you to check how much of the code is used by any given function. This tool works in the same way as the debugger and therefore reflects any limitations that may exist in the debugger.
Programmers can use the tool to log code coverage when they customize Navision. Code logging gives you an overview of the code that is executed in a usage scenario.
The Code Coverage tool can often be used instead of or in combination with the C/AL Debugger. Code logging can give programmers a quick overview, while step by step debugging can take a long time. You can read about the C/AL Debugger in the Application Designer's Guide.
The Code Coverage window lists the objects that have been used in a usage scenario.
To Log Code Coverage:
Click Tools, Code Coverage to open the Code Coverage window.
Click Start to clear the contents of the Code Coverage window and begin logging the code.
Perform the operations that you want to monitor.
When you are finished, go back to the Code Coverage window. It now contains a list of the tables, forms, reports, dataports and codeunits that were used in the operations that you just performed.
Click Stop when you are finished logging the code.
Select the object for which you want to see the code that was used. You can also select an object without first clicking Stop.
Click Code and the Code Overview window opens.
The Code Overview window displays the code that is contained in this specific object. The lines of code that have been executed are colored black. The lines of code that have not been executed are colored red.
The Code Overview window displays the lines of code in the same way as the debugger:
Bullets are shown on each line that contains executable code.
The lines that are marked with a bullet are the only ones for which the information displayed is correct.
The lines of code that are not marked with a bullet are simply displayed in the same colors as the lines of code that surround them.
The information displayed in the Code Overview window is similar to the information shown in the debugger. The main difference is that in the debugger you see the code being executed, while the Code Overview window shows you which lines of code have been executed.
Running the Code Coverage tool when you are using Navision can generate an extremely large log file.
Note
You must not modify objects and log code coverage at the same time, because this will give inconsistent results.
I would request you to check the code coverage in Warehouse-->>Planning and Execution-->>Transfer Order
It shows only 4 to 5 records. However I know that Codeunit 22 is used in Transfer Order when we post an order of that item which is not an inventory then it shows the error "Item is not in inventory".
While Codeunit 22 is not in the code coverage of Transfer Order. Why?
A tip if you want to reduce the clutter a code coverage session gives you: You can use CODECOVERAGELOG(TRUE) to turn it on at the specific moment you want ( replace the TRUE wit FALSE to turn it off again )
Hey Berger--
Would you please explain where should I use this property CodeCoverage(True/False) to check on a specific moment.
Ex-
If I post an TO with 1000000 quantity, it will give an error "Item is not on inventory". I want to check which codeunit is using this error or coding.I want to check it at the last when it gives the error.
Thanks for the prompt reply.
A tip if you want to reduce the clutter a code coverage session gives you: You can use CODECOVERAGELOG(TRUE) to turn it on at the specific moment you want ( replace the TRUE wit FALSE to turn it off again )
Hey --
Would you please explain where should I use this property CodeCoverage(True/False) to check on a specific moment.
Ex-
If I post an TO with 1000000 quantity, it will give an error "Item is not on inventory". I want to check which codeunit is using this error or coding.I want to check it at the last when it gives the error.
I copy the CodeCoverage function in the code unit, it shows the warning that is obsolete. How?
thank you for your replies.
I do have a single doubt that when I post the sales order then a form opens then I click the code button then I see --
FORM.RUN(FORM::"Code Coverage"); is in RED COLOR while it has been executed. Thats the reason we see the form after posting any sales order.
I understand that it should be in the black color. Why is it in the red?
Comments
Did you read the terms and conditions before posting to forum...?
I didn't read the required documents before posting into this forum.
please answer of my question if you know except commenting on it.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I understand it now completely.
Thanks again!
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I do have a doubt in code coverage.
I would request you to check the code coverage in Warehouse-->>Planning and Execution-->>Transfer Order
It shows only 4 to 5 records. However I know that Codeunit 22 is used in Transfer Order when we post an order of that item which is not an inventory then it shows the error "Item is not in inventory".
While Codeunit 22 is not in the code coverage of Transfer Order. Why?
1. Start Code coverage
2. Create TO and Post (ship)
3. Stop Code coverage
Check the Objects hit.
I found the below list of objects while posting TO
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Thank you very much!
Hey Berger--
Would you please explain where should I use this property CodeCoverage(True/False) to check on a specific moment.
Ex-
If I post an TO with 1000000 quantity, it will give an error "Item is not on inventory". I want to check which codeunit is using this error or coding.I want to check it at the last when it gives the error.
Thanks for the prompt reply.
Very helpful tip. Thanks.
Would you please explain where should I use this property CodeCoverage(True/False) to check on a specific moment.
Ex-
If I post an TO with 1000000 quantity, it will give an error "Item is not on inventory". I want to check which codeunit is using this error or coding.I want to check it at the last when it gives the error.
I copy the CodeCoverage function in the code unit, it shows the warning that is obsolete. How?
You can also turn on Code Coverage from within your own code.
You will first need to define a record variable named CodeCoverage of subtype Code Coverage and delete all records from it.
You can then turn Code Coverage on/off using the CODECOVERAGELOG function. To see what was logged, run the Code Coverage form (565).
thank you for your replies.
I do have a single doubt that when I post the sales order then a form opens then I click the code button then I see --
FORM.RUN(FORM::"Code Coverage"); is in RED COLOR while it has been executed. Thats the reason we see the form after posting any sales order.
I understand that it should be in the black color. Why is it in the red?