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 extension Double Parse exception

    Scheduled Pinned Locked Moved Support
    nunitbuildmaster
    4 Posts 1 Posters 11 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

      I get the following error from the NUnit extension after running the tests.
      System.FormatExcepyion: Input string was not in correct format.
      I'm using Windows Server 2012 Standard.

      Maybe the extension doesn't specify CultureInfo.InvariantCulture in their Double.Parse call?
      I've tried changing the decimal separator in Windows Region settings but it didn't work.

      Image Text

      Same issue as this question:
      link text

      Error outout:

      run: 4, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0,146542291976769 seconds INFO: Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
      ERROR: An unhandled exception occurred while executing this action: System.FormatException: Input string was not in a correct format.
      at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
      at Inedo.BuildMasterExtensions.NUnit.NUnitAppAction.RunTests()
      at Inedo.BuildMaster.Extensibility.Actions.Testing.UnitTestActionBase.Execute()
      at Inedo.BuildMaster.Extensibility.Actions.ActionBase.ExecuteInternal(IActionExecutionContext context, ExtensionConfigurerBase extensionConfigurer, Boolean resumeNextOnError, Boolean logErrorsAsWarnings)

      Product: BuildMaster
      Version: 4.7.3

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

        Hmm ... looking at the code, it looks like there's a TryParse being used instead of just a ParseDouble.

        I wonder if the error is on the date parse? Can you check the XML file?

        it's probably trivial change, and we can just push a new extension if so.

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

          Here is the xml file. ( Note date="2015-07-02" time="01:01:09" )

          <?xml version="1.0" encoding="utf-8" standalone="no"?>
          <!--This file represents the results of running a test suite-->
          <test-results name="C:\BuildMaster_SVCTMP_A3\Src\CommonLibsTests\bin\Release\CommonLibsTests.dll" total="4" errors="0" failures="0" not-run="0" inconclusive="0" ignored="0" skipped="0" invalid="0" date="2015-07-02" time="01:01:09">
          <environment nunit-version="2.6.4.14350" clr-version="2.0.50727.6421" os-version="Microsoft Windows NT 6.2.9200.0" platform="Win32NT" cwd="C:\BuildMaster_SVCTMP_A3\Src" machine-name="WIN-8LMKRVFDRQT" user="SYSTEM" user-domain="WORKGROUP" />
          <culture-info current-culture="en-ZA" current-uiculture="en-US" />
          <test-suite type="Assembly" name="C:\BuildMaster_SVCTMP_A3\Src\CommonLibsTests\bin\Release\CommonLibsTests.dll" executed="True" result="Success" success="True" time="0.344" asserts="0">
          <results>
          <test-suite type="Namespace" name="MMSTests" executed="True" result="Success" success="True" time="0.312" asserts="0">
          <results>
          <test-suite type="Namespace" name="CommonLibs" executed="True" result="Success" success="True" time="0.311" asserts="0">
          <results>
          <test-suite type="Namespace" name="Utilities" executed="True" result="Success" success="True" time="0.311" asserts="0">
          <results>
          <test-suite type="TestFixture" name="DateTimeUtilsTest" executed="True" result="Success" success="True" time="0.307" asserts="0">
          <results>
          <test-case name="MMSTests.CommonLibs.Utilities.DateTimeUtilsTest.EndOfWeek_Correct" executed="True" result="Success" success="True" time="0.262" asserts="2" />
          <test-case name="MMSTests.CommonLibs.Utilities.DateTimeUtilsTest.GetLastOccuranceOfHour_Correct" executed="True" result="Success" success="True" time="0.003" asserts="4" />
          <test-case name="MMSTests.CommonLibs.Utilities.DateTimeUtilsTest.GetNextOccuranceOfHour_Correct" executed="True" result="Success" success="True" time="0.003" asserts="3" />
          <test-case name="MMSTests.CommonLibs.Utilities.DateTimeUtilsTest.TimeBetween_Correct" executed="True" result="Success" success="True" time="0.004" asserts="2" />
          </results>
          </test-suite>
          </results>
          </test-suite>
          </results>
          </test-suite>
          </results>
          </test-suite>
          </results>
          </test-suite>
          </test-results>

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

            Thanks for the bug report. We've just published v4.3 of the NUnit extension which should resolve this issue.

            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