Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Nunit test throwing NullReferenceException

    Scheduled Pinned Locked Moved Support
    nunitbuildmaster
    5 Posts 2 Posters 30 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Hi there

      I am trying to unit test a small library using nunit 3.6.1 but there is a NullReferenceException when executing the nunit step.

      DEBUG: 2017-04-03 17:55:54Z - Using LocalAgent agent on localhost
      DEBUG: 2017-04-03 17:55:54Z - Test file: D:\BuildMaster\Work\TelSearchApi\1.0.2\TelSearchApi.Tests\bin\Release\TelSearchApi.Tests.dll
      DEBUG: 2017-04-03 17:55:54Z - Exe path: D:\BuildMaster\Work\TelSearchApi\1.0.2\packages\NUnit.ConsoleRunner.3.6.1\tools\nunit3-console.exe
      DEBUG: 2017-04-03 17:55:54Z - Output file: D:\BuildMaster\Work\TelSearchApi\1.0.2\f88f84268b644e669c6b4ea0a5c71c36.xml
      DEBUG: 2017-04-03 17:55:54Z - NUnit Console Runner 3.6.1 
      DEBUG: 2017-04-03 17:55:54Z - Copyright (C) 2017 Charlie Poole
      DEBUG: 2017-04-03 17:55:54Z - Runtime Environment
      DEBUG: 2017-04-03 17:55:54Z -    OS Version: Microsoft Windows NT 10.0.14393.0
      DEBUG: 2017-04-03 17:55:54Z -   CLR Version: 4.0.30319.42000
      DEBUG: 2017-04-03 17:55:54Z - Test Files
      DEBUG: 2017-04-03 17:55:54Z -     D:\BuildMaster\Work\TelSearchApi\1.0.2\TelSearchApi.Tests\bin\Release\TelSearchApi.Tests.dll
      DEBUG: 2017-04-03 17:55:55Z - Run Settings
      DEBUG: 2017-04-03 17:55:55Z -     DisposeRunners: True
      DEBUG: 2017-04-03 17:55:55Z -     WorkDirectory: D:\BuildMaster\Work\TelSearchApi\1.0.2
      DEBUG: 2017-04-03 17:55:55Z -     ImageRuntimeVersion: 4.0.30319
      DEBUG: 2017-04-03 17:55:55Z -     ImageTargetFrameworkName: .NETFramework,Version=v4.5
      DEBUG: 2017-04-03 17:55:55Z -     ImageRequiresX86: False
      DEBUG: 2017-04-03 17:55:55Z -     ImageRequiresDefaultAppDomainAssemblyResolver: False
      DEBUG: 2017-04-03 17:55:55Z -     NumberOfTestWorkers: 12
      DEBUG: 2017-04-03 17:55:55Z - Test Run Summary
      DEBUG: 2017-04-03 17:55:55Z -   Overall result: Passed
      DEBUG: 2017-04-03 17:55:55Z -   Test Count: 1, Passed: 1, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0
      DEBUG: 2017-04-03 17:55:55Z -   Start time: 2017-04-03 17:55:54Z
      DEBUG: 2017-04-03 17:55:55Z -     End time: 2017-04-03 17:55:55Z
      DEBUG: 2017-04-03 17:55:55Z -     Duration: 0.877 seconds
      DEBUG: 2017-04-03 17:55:55Z - Results (nunit3) saved as nunit2
      DEBUG: 2017-04-03 17:55:55Z - Results (nunit3) saved as D:\BuildMaster\Work\TelSearchApi\1.0.2\f88f84268b644e669c6b4ea0a5c71c36.xml
      DEBUG: 2017-04-03 17:55:55Z - Deleting temp output file (D:\BuildMaster\Work\TelSearchApi\1.0.2\f88f84268b644e669c6b4ea0a5c71c36.xml)...
      ERROR: 2017-04-03 17:55:55Z - Unhandled exception: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
         bei Inedo.BuildMasterExtensions.NUnit.NUnitOperation.<ExecuteAsync>d__24.MoveNext()
      --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
         bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         bei Inedo.BuildMaster.Windows.ServiceApplication.Executions.PlanExecuter.DeploymentPlanExecuter.<Inedo-ExecutionEngine-Executer-IExecutionHostEnvironment-ExecuteActionAsync>d__25.MoveNext()
      DEBUG: 2017-04-03 17:55:55Z - Cleaning up...
      DEBUG: 2017-04-03 17:55:55Z - Deleting D:\BuildMaster\_SVCTMP\_E53 on localhost...
      DEBUG: 2017-04-03 17:55:55Z - D:\BuildMaster\_SVCTMP\_E53 on localhost deleted.
      DEBUG: 2017-04-03 17:55:55Z - Cleanup complete.
      

      Is there a possible bug in the extension?

      Best regards
      Patrick

      Product: BuildMaster
      Version: 5.6.10

      1 Reply Last reply Reply Quote 0
      • benB Offline
        ben inedo-engineer
        last edited by

        Hello Patrick,

        Yes, this is a bug in the NUnit BuildMaster plugin. It will be fixed in the next release of the plugin, 5.1.2.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Hi Ben

          Thank you for your answer

          Is ther some estimate? I mean does this take some days, weeks or months to be fixed?
          I have no deadline or something. I'm just curious.

          Best regards
          Patrick

          1 Reply Last reply Reply Quote 0
          • benB Offline
            ben inedo-engineer
            last edited by

            NUnit 5.1.2 has been released now, so you can update it from inside BuildMaster at any time.

            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              Perfect. Now it works as expected :-)

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post
              Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation