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
-
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.Same issue as this question:
link textError 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
-
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.
-
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>
-
Thanks for the bug report. We've just published v4.3 of the NUnit extension which should resolve this issue.