Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

Integration with dotCover #102

Open
oskaruitdebos opened this issue Feb 9, 2017 · 2 comments
Open

Integration with dotCover #102

oskaruitdebos opened this issue Feb 9, 2017 · 2 comments

Comments

@oskaruitdebos
Copy link

oskaruitdebos commented Feb 9, 2017

Hi all,

I am attempting to create a fully functional .Net Core build configuration in Teamcity. I got the Nunit integration up-and-running using the following packages:

  • dotnet-test-nunit | version 3.4.0-beta-3
  • dotnet-test-nunit-teamcity | version 3.4.0-beta-3

I can run the unit-tests from commandline (dotnet test) and the visual studio interface. Reporting in Teamcity is done using (dotnet test --teamcity). The thing I am trying to accomplish is getting code coverage information in the build configuration using dotCover.

The dotCover command expects a path to a testrunner executable, like documented here Is there a way to implement this using this testrunner?

I have tried the following:

  • Using the Nunit3 console runner. This results in error’s with not being able to load files or assembly’s from Nunit. The command is run from the Nunit directory, so the probable cause here is that it’s not compatible with the .Net Core class library.
  • Using the NunitLite runner (in all the different builds). This results in error’s with not being able to load files or assembly’s. Probable cause here is that I have not restructured my test project like specified on the NuGet package page.
  • Supplying the dotnet test command to the dotCover. This results in dotCover indicating that it is not a valid executable.
  • Creating a simple cmd file with the dotnet test command as only statement. This results in the tests running, but it’s not picked up by dotcover properly (coverage session finished but no snapshots were created).

Relevant version information:
• Teamcity 9.1.5 (build 37377)
• JetBrains dotCover Console Runner 10.0.2

I am out of ideas basically. I hope that someone can point me in the right direction. I realize that this is more of a questions than an issue, but this does seem like the logical place to start.

Thank you in advance for your support

Oskar uit de Bos

@rprouse
Copy link
Member

rprouse commented Feb 9, 2017

I will leave this open as a question for a bit, but I don't think many people in the team use DotCover. I would recommend contacting JetBrains though, since this doesn't sound like an NUnit specific issue, but one with .NET Core and DotCover.

@oskaruitdebos
Copy link
Author

oskaruitdebos commented Feb 10, 2017

Thank you for keeping the question open. I will follow up on your recommendation and contact JetBrains.

There is relevant content on the Jetbrains support forum about dotcover support for .Net Core projects in Teamcity using xUnit:

Basically there is no support at the moment. So I upvoted the ticket, but it’s open for quite a while so I don’t have high hopes for a short term solution. Will submit a support ticket anyway to see what the plan is with Nunit.

I will get back here with the results so other people may benefit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants