Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. NCover and NUnit

NCover and NUnit

Scheduled Pinned Locked Moved C#
questiontutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sroberts82
    wrote on last edited by
    #1

    Hi, Im new to using NCover and NUnit and I have two questions I cant figure out. I have a project which has 3 classes: Currency.cs CurrencyTests.cs Program.cs Its a console App. When I use NCover it only details coverage of code in Program.cs (the class with the Main() method). How can I look at the code coverage of the Currency class, or any other one I should add? My second question is how to set NCover to run my tests, rather than just the main entry point of the program? I am building my tests in the same project. Thank you in advance,

    N 1 Reply Last reply
    0
    • S sroberts82

      Hi, Im new to using NCover and NUnit and I have two questions I cant figure out. I have a project which has 3 classes: Currency.cs CurrencyTests.cs Program.cs Its a console App. When I use NCover it only details coverage of code in Program.cs (the class with the Main() method). How can I look at the code coverage of the Currency class, or any other one I should add? My second question is how to set NCover to run my tests, rather than just the main entry point of the program? I am building my tests in the same project. Thank you in advance,

      N Offline
      N Offline
      Net_Bond_2 0
      wrote on last edited by
      #2

      To run your test project from NCover you have to do some settings- 1-NCover does not run test cases it uses NUnit for it in your Test project go to -> properties->debug and set start up external project as nunit.exe ( give full path) 2- for command line argument write assembly name of your test project e.g. testproject.dll Now when u will run NCover it will start Nunit and Nunit will take your assembly as project.... Try it

      Ethan Hunt 008 "Licensed to Code" 10th Cloud Corp Banglaore India

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups