Skip to content

Is there any way to execute coverlet using dotnet vstest #190

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

Closed
vikasillumina opened this issue Sep 7, 2018 · 2 comments
Closed

Is there any way to execute coverlet using dotnet vstest #190

vikasillumina opened this issue Sep 7, 2018 · 2 comments

Comments

@vikasillumina
Copy link

Hi @tonerdo,

I had success with using coverlet to get the coverage report for each of the test project using the dotnet test command as I described here:
#184

However to save time on builds, I want to run the tests in parallel by testassemblies or xunit collection. Unfortunately dotnet test doesn't allow to run the tests in parallel however it seems we can do that with dotnet vstest command. But I need the test coverage too, so I was wondering if coverlet will work with dotnet vstest command.

Regards,
Vikas

@p10tyr
Copy link

p10tyr commented Oct 12, 2018

I am working on this with my VS Extension to do that from within VS IDE
(the feature should be available in v1.14)

https://marketplace.visualstudio.com/items?itemName=PiotrKula.prestocoverage

Otherwise you can do it using powershell scripts. run your tests then run coverlet?

But I will now also look into the dotnet vstest command see if I can do something with that.

@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Sep 28, 2019

I want to run the tests in parallel by testassemblies or xunit collection.

I think that this doesn't work...coverlet instrumet dll injecting a static class, so you need to be sure to not instrument more than one time.
I think that we resolve this issue when we'll tackle #357

As @ppumkin adviced you could create a script that launch different test process, but you need to be sure to run one test(one session, so one process) for every target output folder, to avoid double instrumentation.

I'll close for now, feel free to reopen if we want go on with discussion.

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

No branches or pull requests

3 participants