microsoft / codecoverage

MIT License
84 stars 11 forks source link

Question: How to get test coverage from a remote running .NET server/session? #119

Closed sahinM closed 6 months ago

sahinM commented 6 months ago

I am referring to the scenario15 of the Calculator sample application in the documentation. In the doc of Sample scenarios, moreover in the chapter Sessions you are describing very well how to:

  1. Start the code coverage collection with the session scenario-x in the background and in server-mode, and providing the config e.g. output directory and format.
  2. Start webapp-x by connecting to that given session-id- a session-id and the dotnet run command.
  3. Run your dotnet testcommand within the
  4. Shutdown and close your session / server

but let's say, given:

Is it possible to to accomplish that? Can test-x and webapp-x connect to the scenario-x, to exchange code coverage?

In the documentation you are "connecting" to this "session" via the session-id. But does this only work if they are on the same machine? Is there any way to run and collect test coverage of a remotely running application? I am planning to run e2e tests against a running application running on a different machine, and I was assuming that exactly this server mode feature of the dotnet coverage tool provides this.

Thanks in advance 😄.

fhnaseer commented 6 months ago

At this moment we only support coverage collection on a single machine.

Similar feature is requested here, so I am closing this as duplicate.