Branch Coverage is N/A?

Branch Coverage is N/A?

I have tried to install NConver2.0, and got a temporary license key for NCover 2.0 Enterprise Edition. But I found in the converage report that the "Branch Coverage" is always "N/A". Why branch coverage is not avaliable? Is the limitation of temporary license? Or any configuration is related?

In the "Run NCover" options, the "Branch Statements" checkbox is checked on.

And my source code is very simply:

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    ShowMessage(CheckBox1.Checked, CheckBox2.Checked)
End Sub

Private Sub ShowMessage(ByVal flg1 As Boolean, ByVal flg2 As Boolean)
    If flg1 And flg2 And flg3 Then
        MsgBox("both is true")
    Else
        MsgBox("Exists false")
    End If
End Sub

End Class


RE: Branch Coverage is N/A?

yorktao,

Branch coverage shows up as "N/A" because the report is filtered through NCoverExplorer, which does not handle branch coverage at this time.

Stephen Ward


RE: Branch Coverage is N/A?

Thank you for your answer. Can you tell me how to disable this filter to make branch coverage avaliable in the report? In the NCoverExplorer's menu, I have selected [View] -> [Filter] -> [No Filtering] In [Run NConver] window's [Options] -> [Advanced Options] tab, The [Branch Statements] has been checked on.


RE: Branch Coverage is N/A?

yorktao,

The filter isn't available in NCoverExplorer. To see branch coverage in the report, go to [Run NCover] window's [Options] -> [Output Options] and enter a folder path into the "HTML Coverage Report" box. NCover will place a Full Coverage Report into the folder specified. You will have to open the report manually.

Stephen


RE: Branch Coverage is N/A?

It works, thank you very much.


RE: Branch Coverage is N/A?

I have a question to ask you. IF I run the program for twice, the Branch Coverage of first time will be lost. Is it true? How can I Merge the Branch Coverage of the twice time? Thank you.


RE: Branch Coverage is N/A?

todakoen,

As of v2.1 it is impossible to merge branch coverage stats. That bug will be fixed in the next version.

Stephen