NCover Initial Use results

Source: Internet
Author: User
NCover Initial Use results

Refer to the following articles to learn how to use them.
http://blog.csdn.net/haibo1228/article/details/4291890

NCover version NCover-1.5.8

Download Address: Http://downloads.ncover.com/NCover-1.5.8.zip

--------------------------------------------------------
The test code is as follows:

C # code

Using System;  Using System.Collections.Generic;  Using System.Text;    Namespace Ncover_helloworld  {      class program      {public          static String getdata_a ()          {              return " 00001 ";          }            public static String GetData ()          {              return ' Hello world! ';          }            static void Main (string[] args)          {              Console.WriteLine (args). Length);              if (args. Length > 0 && args[0]. ToLower ()--"a")              {                  Console.WriteLine (getdata_a ());              }              else              {                  Console.WriteLine (GetData ());              }      }}  }



--------------------------------------------------------
The test results are as follows:

C:\Program files\ncover>ncover.console "Ncover_helloworld.exe" a
Ncover.console v1.5.8-code Coverage analysis for. net-http://ncover.org
Copyright (c) 2004-2006 Peter Waldschmidt


Command:NCover_HelloWorld.exe
Command Args: "A"
Working Directory:
Assemblies:
Coverage Xml:Coverage.Xml
Coverage Log:Coverage.Log

Waiting for profiled application to connect ... Connected
Configuring Profiler ...
Program Output *******************
1
00001
End program Output *****************

C:\Program files\ncover>ncover.console "Ncover_helloworld.exe"
Ncover.console v1.5.8-code Coverage analysis for. net-http://ncover.org
Copyright (c) 2004-2006 Peter Waldschmidt


Command:NCover_HelloWorld.exe
Command Args:
Working Directory:
Assemblies:
Coverage Xml:Coverage.Xml
Coverage Log:Coverage.Log

Waiting for profiled application to connect ... Connected
Configuring Profiler ...
Program Output *******************
0
Hello World!
End program Output *****************

--------------------------------------------------------

This runs two times, after each run, open coverage.xml to see the code coverage.


--------------------------------------------------------
There is a problem, if the program more complex, how to measure coverage?

--------------------------------------------------------
Another, only find the source of 1.0.1
Http://nchc.dl.sourceforge.net/project/ncover/ncover/ncover-1.0%20RC2/ncover-1.0.1.zip

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.