kaspersorensen / dotnet-maven-plugin

A Maven plugin for building dotnet projects based on project.json
Apache License 2.0
25 stars 15 forks source link

This allows tests to be run using `dotnet xunit` #16

Closed zrochler closed 7 years ago

zrochler commented 7 years ago

This is in response to changes in how dotnet test works which prevents it from passing parameters through to the underlying test runner

kaspersorensen commented 7 years ago

On my machine I get something like this:

$ dotnet xunit
No executable found matching command "dotnet-xunit"

I guess what this means is that you need to install some executable/plugin to run xunit? Either way, maybe a better way for us to make this more generic and extensible to other non-xunit testing frameworks would be to externalize the "test" part into a property. So you could specify that test-command=xunit instead of the default being "test".

zrochler commented 7 years ago

It requires the project to be setup with the appropriate nuget packages to make the xunit command available. I'm not sure it does (or will ever) really apply outside of xunit, but I replaced the config with a test-command option, so we can support whatever it needs. It opens it up to abuse, but I think that might just be the nature of the beast.