Closed BobBooth closed 6 years ago
This is also an issue in the combined add-in, Military Tools 2.0
@dfoll Also found and logged this issue. I closed it due to being a duplicate. @dfoll @BobBooth was this an issue with the released solution on 10.3.1-10.5.1? Or is it something that just happened? Have you worked with @csmoore to provide additional details as to why this is happening?
I have confirmed that this same issue is with the released version of the product. I also have verified that if you run the tool with radius or diameter the tool produces the same outputs.
JENKINS
Risks: This is the first time that we have implemented a test correctly. We have done it in the past, but not sure if this will produce an ability for the tool to pass and fail.
The bug fix has been done in commit / branch :
https://github.com/Esri/distance-direction-addin-dotnet/commit/b6293dd6070b53b57766f5f4e3c732bdbb9bacc6 /
https://github.com/Esri/distance-direction-addin-dotnet/tree/csm/%23449-bad-label-on-calc-circle
Removing dev label and looking into unit test possibilities of testing this internal method: https://github.com/Esri/distance-direction-addin-dotnet/blob/dev/source/addins/ArcMapAddinDistanceAndDirection/ArcMapAddinDistanceAndDirection/ViewModels/CircleViewModel.cs#L811
But there does not appear to be anything changed external to this method to test so this may not be a good unit test candidate.
Should look like this after bug fix (note: line is the measurement tool just verifying the calculation):
@topowright @ACueva - I created an intentionally-failing test case for if/when you want to test that the framework is capturing failures correctly - in this branch:
https://github.com/Esri/distance-direction-addin-dotnet/blob/csm/%23449-force-unit-test-fail
Failing case:
Working on verifying fail case from within Jenkins.
Added IsDistanceCalcExpanded test in https://github.com/Esri/distance-direction-addin-dotnet/commit/e6901817bd830c043186360f49ad0685aa1f6412 to test diameter vs. radius
Distance and Direction unit tests are now included in the military-tools-for-arcgis-build project both single and MT add-in. These tests run automatically after creating the Distance and Direction add-in.
15:28:40 Loading ArcMapAddinDistanceAndDirection.Tests.dll...
15:28:40 Starting execution...
15:29:14
15:29:14 Results Top Level Tests
15:29:14 ------- ---------------
15:29:14 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel
15:29:14 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_IsDistanceCalcExpanded
15:29:14 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException
15:29:15 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException10
15:29:15 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException11
15:29:15 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException2
15:29:15 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException3
15:29:15 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException4
15:29:15 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException5
15:29:15 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException6
15:29:15 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException7
15:29:15 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException8
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException9
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException2
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException3
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException4
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException5
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException6
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException7
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException8
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException2
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException3
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException4
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException5
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException6
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException7
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LineViewModel
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException2
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException3
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException4
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException5
15:29:16 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException6
15:29:16 37/37 test(s) Passed
15:29:16
15:29:16 Summary
15:29:16 -------
15:29:16 Test Run Completed.
15:29:16 Passed 37
15:29:16 ----------
15:29:16 Total 37
15:29:16 Results file: c:\jenkins\workspace\military-tools-for-arcgis-build\distance-direction-addin-dotnet\source\addins\ArcMapAddinDistanceAndDirection.Tests\bin\Release\TestResults\avel5840_SOLWIN07-J03 2018-01-11 15_28_40.trx
Tested the build using a different branch @csmoore created specifically to test:
15:49:36 Loading ArcMapAddinDistanceAndDirection.Tests.dll...
15:49:37 Starting execution...
15:50:10
15:50:10 Results Top Level Tests
15:50:10 ------- ---------------
15:50:10 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel
15:50:10 Failed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_GuarenteedFail
15:50:10 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException
15:50:10 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException10
15:50:10 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException11
15:50:10 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException2
15:50:10 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException3
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException4
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException5
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException6
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException7
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException8
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.CircleViewModel_ThrowsException9
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException2
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException3
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException4
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException5
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException6
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException7
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.EllipseViewModel_ThrowsException8
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException2
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException3
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException4
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException5
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException6
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LinesViewModel_ThrowsException7
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.LineViewModel
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException2
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException3
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException4
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException5
15:50:11 Passed ArcMapAddinDistanceAndDirection.Tests.ArcMapAddinDistanceAndDirectionTests.RangeViewModel_ThrowsException6
15:50:11 36/37 test(s) Passed, 1 Failed
15:50:11
15:50:11 Summary
15:50:11 -------
15:50:11 Test Run Failed.
15:50:11 Passed 36
15:50:11 Failed 1
15:50:11 ----------
15:50:11 Total 37
15:50:11 Results file: c:\jenkins\workspace\military-tools-for-arcgis-build\distance-direction-addin-dotnet\source\addins\ArcMapAddinDistanceAndDirection.Tests\bin\Release\TestResults\avel5840_SOLWIN07-J03 2018-01-11 15_49_37.trx
The tests, even with failures are not triggering an error on the Jenkins side. Will log an issue to address this.
@ACueva I feel like this is not done until this lives in a project that is attached to a pipeline not attached to the old projects.
We might need to see if we can test this using MS Test. @ACueva can you add more info to this if needed
NOTE: added the same steps to the Pro checklist test for when #540 is implemented
When I define a point with the "From" set to "Diameter", then use the distance calculator and set the time and rate (in this case, Time: 60 hours, Rate 10 M/H), I get an output with a radius 600 meters, labeled Radius: 600 M. Given the fact that the "From" was set to "Diameter", I would at least expect the label to say Diameter: 1200 M, which would match the (questionable, see Create Circle from Radius/Diameter only affects labeling, not size of circle - unexpected #448) behavior of the tool
Testing on ArcMap 10.6, Distance and Direction Add-In 2.1.1