I have the following preconditions:
dnx version 1.0.0-beta5
project.json
in Unit-test project
"frameworks": {
"dnx451": {
"dependencies": {
"xunit": "2.1.0-beta3-*",
"xunit.runner.dnx": "2.1.0-beta3-*",
"xunit.abstractions": "2.0.0",
"Moq": "4.2.1507.118",
}
}
},
"commands": {
"test": "xunit.runner.dnx -xml TestResults.xml"
},
When I run tests within Visual Studio, a new file TestResults.xml is created, but it is empty except for :
<?xml version="1.0" encoding="utf-8"?>
<assemblies>
<assembly />
</assemblies>
When I run the command dnx . test -xml TestResults.xml
from cmd, I get the XML file with results. What should I do to obtain the same result if run tests from Visual Studio?
Have you tried changing your commands to this:
{
"commands": {
"test": "xunit.runner.dnx"
}
}
And running your command line like this: dnx test -xml TestResults.xml
? As far as I see it, there's no reason why the command line parameters wouldn't be forwarded to the runner.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With