Collecting Code Coverage On Your Build Server With NCover
NCover Code Central allows you to monitor any number of build servers and test machines and collect coverage data. Code Central can collect coverage directly if it is installed locally on the build server or it can connect to any machine with Collector installed and collect coverage remotely.
Your NCover project is where your code coverage results will be sent and displayed in the NCover GUI. Whether you are planning to collect coverage locally with Code Central, or remotely with Collector, you need to create your new project within Code Central and give your project a name.
On a build server, your project will typically be set to collect coverage on NUNit or MSTest, although any testing tool can be used and the process for setting up your project is similar.
Match type="Regex", Process matching="nunit-agent."
Match type="Regex", Process matching="qtagent."
If you are using Code Central to collect coverage locally, you can also use Auto-Configure if you are unsure of your testing tool.
Save the project and you are ready to build your NCover Run command.
Since it's likely that you have more than one project on your build server,having a Code Central project set up to simply monitor the Nunit agent would gather a confusing variety of data on unrelated projects.
The NCover Run command allows NCover to:
The NCover Run command provides a variety of options that allow you to specify build Ids, return error codes, output a coverage summary to the console, register the NCover profiler DLLs and define the working directory..
The final step to completely automate coverage collection is to integrate the NCover Run command from above into your build script.
If you have any additional questions about using Code Central in your build environment, please contact us online.