我可以使用这样的终端在虚幻引擎 4 中运行我的挑战测试:
C:\UnrealEngine4-25\Engine\Build\BatchFiles\RunUAT.bat" RunUnreal -project="C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\HVS.uproject" -scriptdir="C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game" -platform=Win64 -configuration=Development -build=editor -test="DaedalicTestAutomationPlugin.Automation.DaeGauntletTest"
但是,当我尝试在 Jenkins 中运行相同的命令作为构建步骤时,它不会运行,有人以前见过这些错误并且可能知道导致问题的原因吗?
C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game>"C:\UnrealEngine4-25\Engine\Build\BatchFiles\RunUAT.bat" RunUnreal -project="C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game/HVS.uproject" -scriptdir="C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game" -platform=Win64 -configuration=Development -build=editor -test="DaedalicTestAutomationPlugin.Automation.DaeGauntletTest"
Running AutomationTool...
Parsing command line: RunUnreal -project=C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game/HVS.uproject -scriptdir=C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game -platform=Win64 -configuration=Development -build=editor -test=DaedalicTestAutomationPlugin.Automation.DaeGauntletTest -compile
Dependencies are out of date. Compiling scripts....
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1850,5): warning : The referenced project '\Engine\Source\Programs\AutomationTool\Gauntlet\Gauntlet.Automation.csproj' does not exist. [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeGauntletTest.cs(1,7): error CS0246: The type or namespace name 'Gauntlet' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(1,7): error CS0246: The type or namespace name 'Gauntlet' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(6,34): error CS0246: The type or namespace name 'EpicGame' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeGauntletTest.cs(5,36): error CS0246: The type or namespace name 'UnrealTestNode<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(26,44): error CS0246: The type or namespace name 'UnrealAppConfig' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(26,71): error CS0246: The type or namespace name 'UnrealSessionRole' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(26,113): error CS0246: The type or namespace name 'UnrealSessionRole' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeGauntletTest.cs(11,39): error CS0115: 'DaeGauntletTest.GetConfiguration()': no suitable method found to override [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeGauntletTest.cs(7,32): error CS0246: The type or namespace name 'UnrealTestContext' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(11,4): error CS0246: The type or namespace name 'AutoParamAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(11,4): error CS0246: The type or namespace name 'AutoParam' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(17,10): error CS0246: The type or namespace name 'AutoParamAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(17,10): error CS0246: The type or namespace name 'AutoParam' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(23,10): error CS0246: The type or namespace name 'AutoParamAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(23,10): error CS0246: The type or namespace name 'AutoParam' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
Took 1.4241513s to run MSBuild.exe, ExitCode=1
ERROR: Failed to build "C:/UnrealEngine4-25/Engine/Programs/AutomationTool/Saved\UATTempProj.proj":
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1850,5): warning : The referenced project '\Engine\Source\Programs\AutomationTool\Gauntlet\Gauntlet.Automation.csproj' does not exist. [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeGauntletTest.cs(1,7): error CS0246: The type or namespace name 'Gauntlet' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(1,7): error CS0246: The type or namespace name 'Gauntlet' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(6,34): error CS0246: The type or namespace name 'EpicGame' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeGauntletTest.cs(5,36): error CS0246: The type or namespace name 'UnrealTestNode<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(26,44): error CS0246: The type or namespace name 'UnrealAppConfig' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(26,71): error CS0246: The type or namespace name 'UnrealSessionRole' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(26,113): error CS0246: The type or namespace name 'UnrealSessionRole' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeGauntletTest.cs(11,39): error CS0115: 'DaeGauntletTest.GetConfiguration()': no suitable method found to override [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeGauntletTest.cs(7,32): error CS0246: The type or namespace name 'UnrealTestContext' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(11,4): error CS0246: The type or namespace name 'AutoParamAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(11,4): error CS0246: The type or namespace name 'AutoParam' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(17,10): error CS0246: The type or namespace name 'AutoParamAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(17,10): error CS0246: The type or namespace name 'AutoParam' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(23,10): error CS0246: The type or namespace name 'AutoParamAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
DaeTestConfig.cs(23,10): error CS0246: The type or namespace name 'AutoParam' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Jenkins\AppData\Local\Jenkins.jenkins\workspace\HVS_Game\Plugins\Testing\DaedalicTestAutomationPlugin.Automation\DaedalicTestAutomationPlugin.Automation.csproj]
(see C:\UnrealEngine4-25\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)
AutomationTool exiting with ExitCode=1 (Error_Unknown)```
您是否设置了 UNREAL_ENGINE_4_PATH 变量? Daedalic 插件需要它:https://github.com/DaedalicEntertainment/ue4-test-automation#gauntlet
我确认将
UNREAL_ENGINE_4_PATH
变量设置为游戏目录的根目录将消除这些错误。就我而言,这是:
UNREAL_ENGINE_4_PATH = D:\_Projects\MyAwesomeGame
我觉得很奇怪,Gauntlet产生的错误根本没有帮助,而且不可能从中推导出解决方案。