Collecting Coverage during Interactive Testing
Collecting Coverage during Interactive Testing
I am a novice user of NCover and I would like to use NCover to collect coverage for my assembly during the process of Interactive Testing. I will not be using any unit testing tools.
I would like to start my user application that would load the assembly of interest. I would like NCover to be running in the background collecting coverage. Once I perform a series of tasks I would like to stop the coverage tool and look at the generated report.
Is this possible? If so what Command line flags should I be using?
NCover.Console //a
expects a command to be specified.
RE: Collecting Coverage during Interactive Testing
shivaak,
NCover.console.exe yourapptotest.exe //x Coverage.xml //a AssemblyList
//a is optional, by default it will test all of the dlls.
Once you close the Application, your coverage data will be save to coverage.xml.
Hope that helps.
Joe
RE: Collecting Coverage during Interactive Testing
Thank you for the help Joe. I think I probably over complicated my use case. I will try what you have suggested and will write back if I have constraints that cannot be met with the aforementioned command.
I was trying not to start the application when NCover.console is executed. I wanted to start NCover first and then start multiple applications that would be utilizing the assembly of interest.
For Example :
1) Start NCover 2) Start Application 1 and interact with it. Close the application. 3) Start Application 2 and interact with it. Close the application. 4) Stop NCover. 5) Open the Coverage Report.
Is this possible? Also is there a way to combine multiple reports?
For now I can just try starting one application at a time and collect coverage.
Thank you, -Shiva
RE: Collecting Coverage during Interactive Testing
You have to start our application first. We must load your application so it can be instrumented. This is how we obtain the data needed for coverage.
You will need to Start Application 1 by the method I described. You will need to Start Application 2 by the method I described.
Stop both applications when you are done testing.
Load the coverage files into NCover.
NCover Complete has the ability to combine the reports together (Merge).
Thank you,
Joe Feser