How to get a results file from Nunit Test Adapter ran in Visual Studio with Test Explorer

663 views
Skip to first unread message

Matthew Hayhurst

unread,
May 7, 2020, 7:10:40 AM5/7/20
to NUnit-Discuss

Hi, I have been running my tests with Specflow+ through Test Explorer in Visual Studio and a nice .html report is automatically generated at the end by the Specflow+ Runner.

I have switched to Nunit Test Runner (still running through Test Explorer).

However, at the end I can't see any results files at all xml or html?

How do I get it to generate these? Or am I looking in the wrong place?

I tried adding a .runsettings file in the root of the project containing the following code but still no results were written:

<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
    <NUnit>
        <TestOutputXml>TestResults</TestOutputXml>
    </NUnit>
</RunSettings>

Charlie Poole

unread,
May 7, 2020, 11:47:40 AM5/7/20
to NUnit-Discuss
You say you added a .runSettings file in the projet root. Did you also
use the Visual Studio IDE to indicate that the file should be used?

Charlie
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/nunit-discuss/fd848106-c2c3-40d6-af51-73e7a23eb2c6%40googlegroups.com.

Matthew Hayhurst

unread,
May 7, 2020, 11:55:46 AM5/7/20
to NUnit-Discuss
Hi Charlie, thanks for the reply.

The .runSettings is shown in my solution in Visual Studio. Is there something else I need to do to tell Nunit to use this file?


On Thursday, May 7, 2020 at 4:47:40 PM UTC+1, charlie wrote:
You say you added a .runSettings file in the projet root. Did you also
use the Visual Studio IDE to indicate that the file should be used?

Charlie

On Thu, May 7, 2020 at 4:10 AM Matthew Hayhurst
<matthewj...@gmail.com> wrote:
>
>
> Hi, I have been running my tests with Specflow+ through Test Explorer in Visual Studio and a nice .html report is automatically generated at the end by the Specflow+ Runner.
>
> I have switched to Nunit Test Runner (still running through Test Explorer).
>
> However, at the end I can't see any results files at all xml or html?
>
> How do I get it to generate these? Or am I looking in the wrong place?
>
> I tried adding a .runsettings file in the root of the project containing the following code but still no results were written:
>
> <?xml version="1.0" encoding="utf-8"?>
> <RunSettings>
>     <NUnit>
>         <TestOutputXml>TestResults</TestOutputXml>
>     </NUnit>
> </RunSettings>
>
> --
> 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-...@googlegroups.com.

Charlie Poole

unread,
May 7, 2020, 12:50:40 PM5/7/20
to NUnit-Discuss
See https://docs.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2019

On Thu, May 7, 2020 at 8:55 AM Matthew Hayhurst
> To unsubscribe from this group and stop receiving emails from it, send an email to nunit-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/nunit-discuss/f9c2d81d-e894-4024-9110-b6d5d18a7221%40googlegroups.com.

Matthew Hayhurst

unread,
May 11, 2020, 4:55:09 AM5/11/20
to nunit-...@googlegroups.com
Great thanks Charlie....that worked :)

Reply all
Reply to author
Forward
0 new messages