Code Coverage - exporting and filtering

afarr
Member Posts: 287
When using Code Coverage, I would like to:
a) filter out the lines have not been executed (i.e. the red lines)
b) export the lines (actually, just the black lines) to a single text file.
Does anyone konw how to do this?
Thanks,
Alastair
a) filter out the lines have not been executed (i.e. the red lines)
b) export the lines (actually, just the black lines) to a single text file.
Does anyone konw how to do this?
Thanks,
Alastair
Alastair Farrugia
0
Comments
-
filter on "No. of hits" <> 0 then copy and paste them to excel.0
-
Hi Rashed,
Thanks for the quick reply.
I realise now that I can even remove the filter on the Object Type and Object No. and this will show me all the executed code in all the objects. Unfortunately, I can't display the Object Type and Object No. - the only column that shows in "View Columns" is Code. If there is a way of showing those fields that would be great.
Regards,
AlastairAlastair Farrugia0 -
design the form and add the fields to the form.0
-
Tomas,
Dynamics NAV Enthusiast0 -
OK, thanks for that. Here's all the steps (I just sent this out to the other developers I work with because I think it will be quite useful):
1. Design the Code Coverage form (Form 566) and add the fields Object Type and Object ID.
Add some documentation, save and close the form.
2. Go to Tools – Debugger – Code Coverage – Code.
3. Press Ctrl+F7 to view the filters.
4. Remove the filters for Object Type and Object ID (so that you can see code for all the objects together – you can identify which code is for which object thanks to the fields added in step 1 above).
5. Add a filter for No. of Hits, <>0 (this will show only the black lines).
6. If you want you can even copy the lines to Excel.Alastair Farrugia0 -
[Topic moved from Navision forum to Navision Tips & Tricks forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
What you're missing in code coverage is the sequential order in which code is executed.0
-
That is what you use client Monitor for.
Also if you use SQL perform tools. It combines Code coverage with client Monitor so you can debug those really bad code and loops.0 -
This Really Good Tips =D> =D> =D>0
-
i've never find the "no. of hits" very reliable, because the "if" statements (and all the code that does not start and end in the same line), are shown as never hit. (edit: this does not depend from the semicolon, as i wrote before) this makes the code coverage less useful, because you won't see the whole line of code, but only the second(or third or fourth) one
edit: [removed a wrong example and replaced with this one]Code WITH VATAmountLine DO //hits=0 IF FINDSET THEN//hits=1 REPEAT//hits=0 IF (PrevVatAmountLine."VAT Identifier" <> "VAT Identifier") OR//hits=0 (PrevVatAmountLine."VAT Calculation Type" <> "VAT Calculation Type") OR//hits=0 (PrevVatAmountLine."Tax Group Code" <> "Tax Group Code") OR//hits=0 (PrevVatAmountLine."Use Tax" <> "Use Tax")//hits=0 THEN//hits=1 PrevVatAmountLine.INIT;//hits=0
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions