简体   繁体   English

如何在macOS TeamCity代理上运行Quamotion测试

[英]How to run Quamotion tests on macOS TeamCity agents

I'm trying to integrate Quamotion in our TeamCity platform so we can test mobile apps in our CI process. 我正在尝试将Quamotion集成到我们的TeamCity平台中,以便我们可以在CI流程中测试移动应用程序。

I've followed the steps described in the Quamotion documentation . 我已按照Quamotion文档中所述的步骤进行操作

The Build-Steps and Build-Feature have been added but I'm seeing an error on our agents: Build-Steps和Build-Feature已添加,但是我发现我们的代理出现错误:

  • Incompatible runner: PowerShell 不兼容的运行器:PowerShell
  • Unmet requirements: Exists=>(powershell_x86|powershell_x64) exists 未满足的要求:存在=>(powershell_x86 | powershell_x64)存在

PowerShell has been installed on our build server and we can run Quamotion without any errors: I can see the mobile devices which are connected to my build server, install apps, run tests,... . PowerShell已安装在我们的构建服务器上,我们可以运行Quamotion而不会出现任何错误:我可以看到连接到我的构建服务器的移动设备,安装应用程序,运行测试...。 I've tried restarting and reinstalling the agent but that didn't fix it either. 我尝试重新启动并重新安装代理,但这也没有解决。

Is there anything I missed? 我有什么想念的吗?

It sounds like either PowerShell core is not installed on your TeamCity agent or you're not using an up-to-date version of TeamCity. 听起来您的TeamCity代理上未安装PowerShell核心,或者您没有使用TeamCity的最新版本。

To check whether PowerShell Core has been installed, open a Terminal on your agent and run pwsh . 要检查是否已安装PowerShell Core,请在代理上打开终端并运行pwsh If that opens a PowerShell terminal, PowerShell Core has been installed correctly. 如果这将打开PowerShell终端,则表明Powershell Core已正确安装。

From what I can see, support for PowerShell Core has been added to TeamCity 2017.2.2. 据我所知,TeamCity 2017.2.2已添加了对PowerShell Core的支持。 Can you make sure you're using TeamCity 2017.2.2 or later? 您可以确定使用的是TeamCity 2017.2.2或更高版本吗?

Please note: If Powershell Core is installed using the zipped version and manual placement of the unzipped folder, place it in the same folder as the MSI installation does, which is: 请注意:如果使用压缩版本和手动放置解压缩文件夹的方式安装Powershell Core,请将其与MSI安装放置在同一文件夹中,即:

%programfiles%\Powershell\6
%programfiles(x86)%\Powershell\6

These are the folders that the TeamCity build agent search through to find the PS Core installation. 这些是TeamCity构建代理搜索以找到PS Core安装的文件夹。 If the TeamCity build agent find the installation folders, it sets the variables accordingly: 如果TeamCity构建代理找到安装文件夹,它将相应地设置变量:

(example, PS Core x64 bitness) (例如,PS Core x64位)

powershell_Core_6.1.0_x64        6.1.0
powershell_Core_6.1.0_x64_Path   C:\Program Files\PowerShell\6
powershell_Core_x64              6.1.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM