为了执行Xamarin测试云测试,您必须执行appcenter命令。
appcenter test run uitest --app "appName" --devices 228faeda --app-path *appPath* --test-series "master" --locale "en_US" --build-dir *debugFolderPath*这工作得很好。
我想通过Jenkins触发这个命令。
但是我在控制台输出中得到了以下错误
"C:\Program (X86)\Jenkins\工作区\Xamarin Test Cloud Android>appcenter 'appcenter‘不被识别为内部或外部命令、可操作的程序或批处理文件。“
为什么会这样呢?
谢谢
发布于 2018-04-07 17:42:25
确保先安装appcenter。
npm install -g appcenter-cli@1.2.2应用中心测试的Bash脚本
下面是我用于CI的bash脚本。要实现它,您首先需要从App获得一个身份验证令牌。
手动检索API令牌
应用中心CLI要求用户登录,我们可以通过提供登录令牌从构建服务器登录。
使用App,输入以下命令,将[Name Of Token]替换为您想要命名的任何标记
appcenter login
appcenter tokens create -d "[Name Of Token]"它将提供这样的答复:
ID:唯一的Guid API令牌:唯一的API令牌 描述:令牌名称 创建于:时代邮票
应用中心测试CI脚本
bash脚本执行以下操作:
[My UI Test Assembly Name]
[login token][Your App Center App Name][Your Device Id]
#!/usr/bin/env bash
UITestDLL=`find . -name "[My UI Test Assembly Name].dll" | grep bin`
UITestBuildDir=`dirname $UITestDLL`
APKFile=`find . -name *.apk | head -1`
npm install -g appcenter-cli@1.2.2
appcenter login --token [login token]
appcenter test run uitest --app "[Your App Center App Name]" --devices [Your Device Id] --app-path $APKFile --test-series "master" --locale "en_US" --build-dir $UITestBuildDir --asynchttps://stackoverflow.com/questions/49685166
复制相似问题