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



  • 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


  • inedo-engineer

    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.



  • 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


  • inedo-engineer

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



  • Perfect. Now it works as expected :-)



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation