Nunit3 doesn't create TestResult.xml file

1,457 views
Skip to first unread message

Артем Арте

unread,
Oct 5, 2016, 11:21:46 AM10/5/16
to NUnit-Discuss
All I need is to generate automatically a TestResult.xml file after I ran tests.
It's not created locally for VS 2015 and Resharper.
I tried to disable resharper, install NUnit3.Runner and Test Adapter to run from default VS Test Explorer - the same result. No TestResult.xml file.

How to have this file? I need it for CI and sync results with hiptest.



I have installed on dev machine:
Visual Studio 2015
Resharper 10
Nunit 3.

On   CI server I will have no Resharper, but:
MSBuild + TFS,
Nunit 3,
Some runner: NUnit3.Runner or Nunit3.Console or NUNit Test Adapter?

Charlie Poole

unread,
Oct 5, 2016, 11:27:15 AM10/5/16
to NUnit-Discuss
The NUnit test adapter doesn't provide XML output. Our theory at the time of development was that people using the adapter would want whatever output VS produces rather than NUnit-formatted output. Since that time, it has been requested and there is a pending feature request to add it.

Currently, the only runner that provides XML output is the NUnit 3 console runner, which may be installed using the msi or the NUnit.Console nuget package package, among others.

--
You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nunit-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to nunit-...@googlegroups.com.
Visit this group at https://groups.google.com/group/nunit-discuss.
For more options, visit https://groups.google.com/d/optout.

Артем Арте

unread,
Oct 5, 2016, 11:52:46 AM10/5/16
to NUnit-Discuss
So, the only one ability to send my test results (as file of any type, for e.g. *.xml ) to hiptest is use nunit3-console on CI server ? 


>> that people using the adapter would want whatever output VS produces rather than NUnit-formatted output
I was happy, if I could get VS result. It also is not creating...


среда, 5 октября 2016 г., 18:27:15 UTC+3 пользователь charlie написал:
The NUnit test adapter doesn't provide XML output. Our theory at the time of development was that people using the adapter would want whatever output VS produces rather than NUnit-formatted output. Since that time, it has been requested and there is a pending feature request to add it.

Currently, the only runner that provides XML output is the NUnit 3 console runner, which may be installed using the msi or the NUnit.Console nuget package package, among others.
On Wed, Oct 5, 2016 at 7:02 AM, Артем Арте <asa...@gmail.com> wrote:
All I need is to generate automatically a TestResult.xml file after I ran tests.
It's not created locally for VS 2015 and Resharper.
I tried to disable resharper, install NUnit3.Runner and Test Adapter to run from default VS Test Explorer - the same result. No TestResult.xml file.

How to have this file? I need it for CI and sync results with hiptest.



I have installed on dev machine:
Visual Studio 2015
Resharper 10
Nunit 3.

On   CI server I will have no Resharper, but:
MSBuild + TFS,
Nunit 3,
Some runner: NUnit3.Runner or Nunit3.Console or NUNit Test Adapter?

--
You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nunit-discus...@googlegroups.com.

Charlie Poole

unread,
Oct 5, 2016, 11:58:37 AM10/5/16
to NUnit-Discuss
That's correct. To be accurate... the NUnit execution engine includes the capability to produce output xml, but the runner has to call it for that to happen. Only the nunit3-console runner does that.

The issue for adding this feature to the adapter is here: https://github.com/nunit/nunit3-vs-adapter/issues/215

To unsubscribe from this group and stop receiving emails from it, send an email to nunit-discuss+unsubscribe@googlegroups.com.

Артем Арте

unread,
Oct 6, 2016, 8:28:30 AM10/6/16
to NUnit-Discuss
I also found such problem while use nunit3-console vs nunit-console.

Current directory where I run nunit(3)-console is  C:\Projects\Web.Tests\ were app.config file exists.
1. > nunit3-console  Web.Tests.csproj   (v.3.4.)
and 
2. > nunit-console  Web.Tests.csproj    (v. 2.6.4)


nunit3 - works fine.  It finds my app.config and reads appSettings.
while nunit-console see the wrong path to app.config and  Web.Tests.exe.config. It expects to have path to conf as   C:\Projects\Web.Tests\Web.Tests.exe.conf  instead of  C:\Projects\Web.Tests\bin\Debug\Web.Tests.exe.conf  

So, the current fix is to run nunit-console from C:\Projects\Web.Tests\bin\Debug\   
And it looks not comfortable for CI.
Is there any chance to fix this problem?





среда, 5 октября 2016 г., 18:58:37 UTC+3 пользователь charlie написал:

Charlie Poole

unread,
Oct 6, 2016, 10:51:04 AM10/6/16
to NUnit-Discuss
I'm not sure I understand the connection of the config files to the XML report.

In any case, NUnit 2.6.4 and NUnit 3 are different programs and NUnit 2.6.4 is no longer being developed.

Charlie

To unsubscribe from this group and stop receiving emails from it, send an email to nunit-discuss+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages