Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sahinM opened this issue May 14, 2024 · 1 comment
Closed
Labels
duplicate This issue or pull request already exists

Comments

@sahinM
Copy link
Contributor

sahinM commented May 14, 2024

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:

  • a session-id: scenario-x
  • an ASP NET Core web application: webapp-x running on a different machine (e.g. a K8s pod on a namespace webapps) and is exposed with a public IP address within a VNET to restrict access by (e.g. an Agent, which is running integration and e2e tests against this app).
  • integration tests: tests-x triggered again on a another machine (e.g. an agent running an Azure DevOps YAML pipeline) which also is interested to get the code coverage to e.g. push the test results to SonarCloud.

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 😄.

@sahinM sahinM changed the title Question: How to get coverage from a real remote running .NET server/session? Question: How to get coverage from a remote running .NET server/session? May 14, 2024
@sahinM sahinM changed the title Question: How to get coverage from a remote running .NET server/session? Question: How to get test coverage from a remote running .NET server/session? May 14, 2024
@fhnaseer
Copy link
Member

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

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

@fhnaseer fhnaseer added the duplicate This issue or pull request already exists label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants