I'm trying to get code coverage of integration tests ran by nunit,
the tests run my server as an executable with Process.Start
and i want to be able to get coverage report in TeamCity.
It's seems that dotCover is not able to attach to the process started by the tests and get 0% coverage.
Is there a way to do something similar?
Sorry for the delay!
By default dotCover gets coverage info from the main process being profiled and from all its child processes. So I guess that your scenario must work well. Please make sure that there are correct pdb-files in the directory from which you start your child process.
It actualy doesn't work for me,
I read somewhere in the communiy that if you kill the process, Snapshots are not created.
I my integration tests I start the process and also kill it later on, how can i get it to work and create snapshots?
I'm extremely sorry for the delay!
Unfortunately now there is no way to get a snapshot from a process that was killed. This issue is on our roadmap, but not for the nearest release.
Sorry for the inconvinience!
Is there possibly a dotCover API that can be used to signal to the analyzer that the child process will be shut down shortly?
Unfortunately now dotCover doesn't have an API that could be used to perform this task.