Closed mfunk closed 6 years ago
The tests are failing - but this seems like a problem with the actual tools themselves:
Example - if I try to run the Geoname Gazetteer - it won't let me set the parameter if the folder has a space:
So we may have to skip these tests until these issues are resolved with the tools themselves
I'll take a closer look to see if it's something I can fix.
It's quite a well known issue that some of the geoprossing scripts are not forgiving with spaces in file paths:
I personally wouldn't spend too much effort trying to fix that
Ran the tool, verified the pathname in our Jenkins environment is causing this to fail. I was able to rename the project to Solutions_GP_Toolbox_Unit_tests_ArcMap and the new path is: c:\jenkins\Solutions_GP_Toolbox_Unit_tests_ArcMap\workspace
This makes it so the toolbox no longer throws an error.
I'm reverting the changes to the Jenkins Project name and I've unassigned this issue. Per @lfunkhouser we will address this issue during a future sprint.
@mfunk @ACueva Clarity is needed on why we're adding spaces to paths. Is that an intended test to determine if the tests are executed in a proper manner?
I have a work-around for our Jenkins builds, aka, don't use a space in the project name. This might pop up again if a pipeline utilizes spaces in its name, or if we just forget. @mfunk thoughts on this?
It was agreed at scrum to add info in the README to NOT have any spaces in directory paths when executing the tests.
I'm not sure where the problem is as I'm able to manually run Create Geonames Gazetter Locator with a space in the path to the input features and output locator:
Executing: CreateGeonamesGazetteerLocator "'D:\GitHub\solutions geoprocessing toolbox\utils\test\test_data\geonames\Geonames.gdb\MonacoResults' 'Primary Table'" "D:\GitHub\solutions geoprocessing toolbox\utils\test\test_data\geonames\testoutput.gdb\outloc2"
Start Time: Mon Sep 18 07:11:09 2017
Executing (Create Address Locator): CreateAddressLocator "General - Gazetteer" "'D:\GitHub\solutions geoprocessing toolbox\utils\test\test_data\geonames\Geonames.gdb\MonacoResults' 'Primary Table'" "'Feature ID' ObjectID VISIBLE NONE;'*Place Name' PLACENAME VISIBLE NONE;Category FC VISIBLE NONE;Type DSG VISIBLE NONE;Tags <None> VISIBLE NONE;Description DSGNAME VISIBLE NONE;'3-Digit Language Code' LC VISIBLE NONE;'2-Digit Language Code' <None> VISIBLE NONE;Rank NAME_RANK VISIBLE NONE;Neighborhood <None> VISIBLE NONE;City <None> VISIBLE NONE;County <None> VISIBLE NONE;State ADM1NAME VISIBLE NONE;'State Abbreviation' ADM1CODE VISIBLE NONE;Country COUNTRYNAME1 VISIBLE NONE;'Country Abbreviation' COUNTRYCODE1 VISIBLE NONE;'Street Address' <None> VISIBLE NONE;'Full Address' <None> VISIBLE NONE;'Primary Phone' <None> VISIBLE NONE;'Primary URL' '' VISIBLE NONE;'Display X' POINT_X VISIBLE NONE;'Display Y' POINT_Y VISIBLE NONE;'Min X value for extent' POINT_X VISIBLE NONE;'Max X value for extent' POINT_X VISIBLE NONE;'Min Y value for extent' POINT_Y VISIBLE NONE;'Max Y value for extent' POINT_Y VISIBLE NONE;'Additional Field' USER_FLD VISIBLE NONE" "D:\GitHub\solutions geoprocessing toolbox\utils\test\test_data\geonames\testoutput.gdb\outloc2" # DISABLED
Start Time: Mon Sep 18 07:11:09 2017
Executing Create Address Locator...
Succeeded at Mon Sep 18 07:11:13 2017 (Elapsed Time: 4.32 seconds)
Succeeded at Mon Sep 18 07:11:14 2017 (Elapsed Time: 4.97 seconds)
But from the Python prompt in ArcMap:
>>> arcpy.CreateGeonamesGazetteerLocator_defensegeonames(r'D:\GitHub\solutions geoprocessing toolbox\utils\test\test_data\geonames\Geonames.gdb\MonacoResults', r'D:\GitHub\solutions geoprocessing toolbox\utils\test\test_data\geonames\testoutput.gdb\outloc5')
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\GitHub\solutions geoprocessing toolbox\geonames\Geonames Tools_arcmap.tbx", line 29, in CreateGeonamesGazetteerLocator
RuntimeError: Object: Error in executing tool
>>>
So the problem does NOT seem to be an issue in the tests, but how Python... or ArcPy is importing and using Create Geonames Gazetter Locator.
This is a issue that should be closed based on the comments above. There should be no spaces in the path when doing unit test for gp.
As of 8/11/2017 Jenkins tests are failing with a space in the path names.
Pro (Desktop similar) test results:
Expected Behavior
Tests and tool should work with spaces in path names.
Current Behavior
See output log for test results: build.zip
Possible Solution
Steps to Reproduce (for bugs)
cd utils/test
TestKickPro.bat
Context
Jenkins tests are failing. Not sure if this is a problem in the tool or the tests.
Your Environment
@csmoore @ACueva