Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:25

    github-actions[bot] on gh-pages

    Update TestCaseData.md (#530) … (compare)

  • 03:24

    SeanKilleen on master

    Update TestCaseData.md (#530) … (compare)

  • 03:24
    SeanKilleen closed #530
  • Nov 27 20:32
    rprouse commented #3677
  • Nov 27 14:31
    jnm2 commented #3376
  • Nov 27 14:30
    jnm2 commented #3376
  • Nov 27 14:30
    jnm2 commented #3376
  • Nov 27 14:29
    jnm2 commented #3376
  • Nov 27 14:20
    jnm2 commented #3677
  • Nov 27 14:15
    jnm2 labeled #3677
  • Nov 27 14:08
    jnm2 commented #3376
  • Nov 27 14:08
    jnm2 commented #3376
  • Nov 27 07:49
    manfred-brands commented #3677
  • Nov 27 07:40
    Dreamescaper commented #3677
  • Nov 27 07:39
    manfred-brands commented #3677
  • Nov 27 07:35
    manfred-brands commented #3677
  • Nov 27 07:15
    Build #6920 passed
  • Nov 27 07:10
    manfred-brands commented #3376
  • Nov 27 07:09
    manfred-brands synchronize #3677
  • Nov 27 07:03
    Dreamescaper commented #3677
Julien
@LiohAu
@OsirisTerje It seems that people using .NET core projects in Windows based VS or in VS Mac/MonoDevelop are all depending on VsTest. But if you are not using a .NET core based project and that NUnit is in your project, the NUnit addin in VSMac/MonoDevelop, seems to fallback to an internal runner, and I did not find yet how to provide the settings...
Terje Sandstrom
@OsirisTerje
@LiohAu Just for others to see, MS has confirmed this doesn't yet work on VS Mac, see https://github.com/nunit/nunit3-vs-adapter/issues/778#issuecomment-679292768. They suggest a command line work around until the issue is resolved
Stephan
@zpqrtbnk
Quick Q before filing an issue... running tests with dotnet test ... and nunit3 adapter 3.16.1 does produce a complete Xml file, upgrading to adapter 3.17.0 produces an Xml file that only contains the <command-line> element - rings a bell / known issue?
Terje Sandstrom
@OsirisTerje
@zpqrtbnk No. Please raise an issue with repro :-)
Stephan
@zpqrtbnk
Issue nunit/nunit3-vs-adapter#780 - reproduces on my project, going to try to reproduce on a smaller-scale project that I can share
thanks
Marius Morar
@marius02
Hello, Is there a way to load a dll that is targeting .net framework 4.7.2 into an asp.net core web application? I have the following error when exploring the nunit tests( Tests = new TestNode(TestEngineRunner.Explore(TestFilter.Empty));):
            LoadPackage(testFile);

            TestEngine = TestEngineActivator.CreateInstance();

            TestEngineRunner = TestEngine.GetRunner(_package);

            Tests = new TestNode(TestEngineRunner.Explore(TestFilter.Empty));
The error:
NUnit.Engine.NUnitEngineException: 'An exception occurred in the driver while loading tests.'
FileNotFoundException: Could not load file or assembly 'TestingFramework, Version=9.2.2.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
Chris Maddock
@ChrisMaddock
Hi @marius02 - not yet. See nunit/nunit-console#465 for tracking
Alberto Bar-Noy
@AlbertoBN
Hello, I have a weird problem with NUnit3-console. I am trying to run my tests via command line and have NUnit.Allure for reports in my code as well. When I call the command line the console runner is stuck and neither runs tests not produces any output even when --trace=Verbose is used... Any insights? (same question goes to allure gitter. I am at a total loss here)
The project is a full .Net framework one...
Chris Maddock
@ChrisMaddock
@AlbertoBN try running with --labels=All, see if you get stuck on a particular test?
Alberto Bar-Noy
@AlbertoBN
@ChrisMaddock No joy. Stuck on the get go... waiting 10 minutes to see a label ... :(
Alberto Bar-Noy
@AlbertoBN
OK so... I went a little bit crazy and run the project with vstest.console... and I noticed that allure is dependent on Newtonsoft.Json 12.0.0 But this dependency was not mentioned in the package. I added it and run with NUnit again and TADAAAAAAAAAA (the windows 95 one)
Chris Maddock
@ChrisMaddock
@AlbertoBN How strange - I'd have expected that to crash rather than hang. Glad you're sorted, either way! :-)
Marius Morar
@marius02
@ChrisMaddock thanks for the reply , you have any suggestions to workaround this issue(nunit/nunit-console#465)? maybe to create a wcf service and to consume it via asp.net core web application, or an web api/rest app ?
Chris Maddock
@ChrisMaddock
Hmm...what's your usecase, why do you need to run an netfx test assembly from a .NET Core test runner? Or is it that you have a single test runner and want to be able to run both .NET Core and netfx test assemblies from it?
Chris Maddock
@ChrisMaddock
Here's a thought, have you considered using NUnitLite for you .NETFX test suites? That was your test runner could just start them up in a separate process and retrieve the results? It would mean you wouldn't really be using the engine for the netfx stuff of course.
Marius Morar
@marius02
the use case: I want to parse the test dll(NETFX ) and display the tests in a asp net core web app(kind of a NUnit Gui for the web, but customized), I'm not able to alter the test dll for now, but I think I will change my approach
Daniel Abrahamsson
@danabr
I have an issue with the NUnit test agent crashing ("Remote test agent exited with non-zero exit code"). What can I do to start debugging it? My tests run fine when I run them through VS.
Daniel Abrahamsson
@danabr
It is interesting to note that I don't get any crash if I use process=Single.
Ah. I found an issue in one of my test assemblies. A StackOverflowException, so naturally the process crashes.
Mikkel Nylander Bundgaard
@mikkelbu
Usually, one can diagnose these kinds of problems by running with the flag --inprocess
Daniel Abrahamsson
@danabr
Yep, that's what I did (with the equivalent process=Single). Turned out to be that I had forgotten to enable tail calls when I converted a F# project to the new project file format. The reason I did not see the problem every time was that the test causing the trouble in turn invoked FsCheck (generating random tests).
Chris Maddock
@ChrisMaddock
@danabr FYI the next version of the NUnit Console should tell you when you hit a stackoverflow exception. :-) (If it's easy to revert your current fix, I'd be interested to know if using the v3.12 beta version would have helped here?)
Daniel Abrahamsson
@danabr

@ChrisMaddock : It is easy to revert. This is what 3.12-beta1 gives me:

Unhandled Exception: NUnit.Engine.NUnitEngineException: Remote test agent was terminated due to a stack overflow.

So that's exactly the information I was after :)

Daniel Abrahamsson
@danabr
Btw, does 3.12 drop support for the legacy nunit2 format? Using format=nunit2 I get:
NUnit.Engine.NUnitEngineException : Error encountered in resolving output specification: OutputPath: ..\Tests\TestRes
  ult.xml, Format: nunit2
    ----> System.IO.FileNotFoundException : Could not load file or assembly 'nunit.engine.api, Version=3.0.0.0, Culture
  =neutral, PublicKeyToken=2638cd05610744eb' or one of its dependencies. The system cannot find the file specified.
Bastian Schmidt
@batzen
Hi there. Is there any chance to get a pre-release of nunit 3.13 on nuget? Or is there some CI nuget feed i can use?
Chris Maddock
@ChrisMaddock
@danabr Hooray! On the nunit2 format - no - at least...not intentionally! It's a bug that needs fixing in the beta. :-)
@batzen builds of master available here: https://www.myget.org/feed/nunit/package/nuget/NUnit. Not sure on the release date sorry, might be worth asking in an issue for the right people to see.
Bastian Schmidt
@batzen
@ChrisMaddock Thx for the link. I don't want to create pressure, so there is no need for an issue. I just overlooked the mention of the myget feed in the readme. ;-)
Alberto Bar-Noy
@AlbertoBN
Hello everyone. I have a rather (IMO) unusual question. I have an assembly with tests and logging with NLog. I extended NLOG to write any logs to the console output either by using TestContext or Console.WriteLine (different set of tryouts) and I was hoping to see the logs on a TeamCity build log. Alas I only see logs from one test and the rest is only assertions. Any ideas on how to overcome this? Thanks in advance
Alberto Bar-Noy
@AlbertoBN
And to answer my own question... RTFM... TestContext.Progress.
Zach Miller
@zmmille2
Hey, I'm having trouble getting VSCode to pick up Nunit tests - is there any launch.json configuration I have to do to get this to work? I was under the impression that this should "just work" with the C# extension
Zach Miller
@zmmille2
Looks like it was an issue with the solution file - .csproj files needed to be added to the .sln file, OmniSharp looks for the different .csproj files listed in the .sln file if there is one and we hadn't added it in.
Marius Morar
@marius02
Is there a way to hide or fix this nunit warning (I have the latest one: 3.17)? or why is this triggered at the end of the running tests?
[06.10.2020 PM 06:20:33 Warning] Exception NUnit.Engine.NUnitEngineUnloadException,    Exception thrown unloading tests from D:\Git\Tests\Test\bin\x86\Debug\Test.dll
[06.10.2020 PM 06:20:33 Warning] Unable to unload application domain: unload thread timed out after 30 seconds.
Application domain was unloaded before all details could be read.

[06.10.2020 PM 06:20:33 Warning]    at NUnit.Engine.Services.DomainManager.DomainUnloader.Unload()
   at NUnit.Engine.Runners.TestDomainRunner.UnloadPackage()
   at NUnit.Engine.Runners.AbstractTestRunner.Unload()
   at NUnit.Engine.Runners.MasterTestRunner.UnloadPackage()
   at NUnit.Engine.Runners.MasterTestRunner.Unload()
   at NUnit.VisualStudio.TestAdapter.NUnitEngine.NUnitEngineAdapter.CloseRunner()
   at NUnit.VisualStudio.TestAdapter.NUnit3TestExecutor.RunAssembly(String assemblyPath, IGrouping`2 testCases, TestFilter filter)
[06.10.2020 PM 06:20:33 Informational] NUnit Adapter 3.17.0.0: Test execution complete
[06.10.2020 PM 06:20:33 Error] An exception occurred while invoking executor 'executor://nunit3testexecutor/': Exception encountered unloading application domain
Exception encountered unloading application domain: Attempted to access an unloaded appdomain. (Exception from HRESULT: 0x80131014)
Application domain was unloaded before all details could be read.

[06.10.2020 PM 06:20:33 Informational] ========== Run test finished: 1 run (0:03:11.1407897) ==========
Terje Sandstrom
@OsirisTerje
@marius02 If you create a small repro and raise an issue at the NUnit3TestAdapter repo https://github.com/nunit/nunit3-vs-adapter it might be possible to fix. Hiding it, you can't. It is an exception, and we can't hide them . I see the exception starts down in the engine, so it can be an NUnit engine issue too, but if we start from the adapter we can take it from there. But, we do need a repro :-)
Marius Morar
@marius02
is someone using https://github.com/endless-qa/nunit-test-video-recorder for recording tests?
Tanner Gooding
@tannergooding
I was wondering if I could get a summary of the v4 nunit adapter and why the major version change?
Wasn't quite sure what benefits/differences it would bring over the v3 adapter
I typically try to keep my projects on the latest of each, but couldn't find much outside https://docs.nunit.org/articles/vs-test-adapter/Adapter-Release-Notes.html on the new preview adapter
Joseph Musser
@jnm2
/cc @OsirisTerje
Terje Sandstrom
@OsirisTerje
@marius02 THe issue above - are you still having it?
Terje Sandstrom
@OsirisTerje
@tannergooding The reason for the major version change is that the way v4 interacts with the nunit.engine has been completely rewritten. The v3 version is heavily dependent on using XML internally all over the adapter code.
In v4 this has changed to transforming the xml to an object model at the time it is loaded from the engine, and then working on the object model instead. This brings back the Explicit feature, and the intention is to pave the way for other changes we can do. Further, under discussion is a possible drop of supporting the vsix variant, and also set the minum supported framework version to 4.5. Due to the internal rewrite there might be a intermittent loss of some features, we got one in the alpha.1 version, which is fixed now for the beta, but there might me more. However, there are around 20000 downloads now, with very few issues reported, so it might be better then feared. The changes will also pave the way for a possible better handling of the FQN issues we have - which are very annoying, and which are near impossible to handle in v3. We still need some more from MS in order to do this, but v4 should then be able to handle it. When the adapter was first written back in 2011/2012 it was a much simpler "thing" than it has become over the years. At that time the XML approach was ok, but now, the code is simply too cluttered to continue.
Terje Sandstrom
@OsirisTerje
@tannergooding About the benefits in v4, in addition to bringing back the Explicit feature (and better than it was before), v4 is generally faster, and will handle large amount of tests much better. Further, with an upcoming fix in NUnit itself we can skip the pre-execution discovery phase completely, thus making the adapter even faster. This will not be possible to do with the v3 code base.
Joseph Musser
@jnm2

@mikkelbu Wow, I missed this:

do you know if it will be a problem that our pdb files mentions unknown files (or more precisely temp-files)?

I don't know of any downside to this. It's been the norm for pdb files to not be found.
I like to use <EmbedAllSources>true</EmbedAllSources> in my Directory.Build.props though.

Eugene Krapivin
@EugeneKrapivin
Hey all! quick question, is there a way to create a generic fixture that works with TestFixtureSource as well? I'm trying to check multiple implementations of the same interface against a range of parameters and can't seem to find a way... Thanks!
2 replies
Johan Larsson
@JohanLarsson
---------- Starting test discovery ----------
NUnit Adapter 3.17.0.0: Test discovery starting
NUnit Adapter 3.17.0.0: Test discovery complete
NUnit Adapter 3.17.0.0: Test discovery starting
NUnit Adapter 3.17.0.0: Test discovery complete
NUnit Adapter 3.17.0.0: Test discovery starting
NUnit Adapter 3.17.0.0: Test discovery complete
No test is available in C:\Git\_GuOrg\Gu.Reactive\Gu.Wpf.Reactive\bin\Debug\net46\Gu.Wpf.Reactive.dll C:\Git\_GuOrg\Gu.Reactive\Gu.Reactive\bin\Debug\net46\Gu.Reactive.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
========== Test discovery finished: 1279 Tests found in 7,9 sec ==========
^ is confusing, it both says tests were found and not
No tests run by visual studio runner, resharper runner runs the tests like always
Sergey Pogorelov
@SeregaFreeman
Hi everyone!
Is it possible to gather assertions as a List<Action> and then pass them to Assert.Multiple?
Mikkel Nylander Bundgaard
@mikkelbu
You cannot do it directly, but one possibility is something like
        [Test]
        public void Test()
        {
            var data = 14;
            var assertions = new List<Action>
            {
                () => Assert.That(data, Is.EqualTo(4)),
                () => Assert.That(data, Is.EqualTo(6)),
                () => Assert.That(data, Is.EqualTo(8))
            };

            Assert.Multiple(() =>
            {
                foreach (var assertion in assertions)
                {
                    assertion.Invoke();
                }
            });
        }