Options

Code coverage

maikeljmaikelj Member Posts: 50
edited 2003-09-11 in Navision Financials
Hello,

Is there a place where it's cool?

Here's my question:

Can anybody tell me how to start code coverage (like the client monitor)?
If I open the help it only says a procedure to open Navision with a certain command line.
But what I want to do is start the code coverage when Navision is already started and then using a codeunit...

So can anybody help me.

Maikel

Comments

  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Here in our office it is really cool :)

    But to answer your question: Code Coverage is only available in Navision Attain. This is taken from the MBS-Navision 3.70 on-line help:
    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.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    maikeljmaikelj Member Posts: 50
    Thanks Luc,

    I referred to the table monitor in stead of code coverage.
    That was my problem. Now it works.

    In our office we don't have an airco :(

    Have a nice (and cool) weekend everyone.
  • Options
    KowaKowa Member Posts: 918
    Hi all,

    Just a short remark :

    Code Coverage did not start with Attain , it is already available in Financials 2.60. :D
    Kai Kowalewski
Sign In or Register to comment.