我正在尝试设置我们的iOS XCUITests以在AWS Device Farm上运行,但似乎无论我如何构建和上传它们,测试都不会运行.它们在XCode中本地运行时执行并传递,但不在AWS Device Farm上运行.
我已经设置了绝对最简单的应用程序,我可以设法尝试隔离此问题.它由一个带有单个Label的View和一个用于验证标签是否存在的UI Test组成.
以下是AWS Device Farm界面中显示的错误.
深入研究日志文件会显示(在"应用程序输出"日志文件中):
2016-04-03 19:07:39.842 XCTRunner[195:28521] Running tests...
2016-04-03 19:07:39.868 XCTRunner[195:28521] Unable to load configuration data from specified path ; error: The file name is invalid.
2016-04-03 19:07:39.872 XCTRunner[195:28521] Looking for test bundles in /var/mobile/Containers/Bundle/Application/883D7F70-E525-4478-9E5E-C87F72A83879/MyTestAppUITests-Runner.app/PlugIns
2016-04-03 19:07:39.875 XCTRunner[195:28521] Found test bundle at /var/mobile/Containers/Bundle/Application/883D7F70-E525-4478-9E5E-C87F72A83879/MyTestAppUITests-Runner.app/PlugIns/MyTestAppUITests.xctest
2016-04-03 19:07:39.878 XCTRunner[195:28521] Looking for configurations in /var/mobile/Containers/Bundle/Application/883D7F70-E525-4478-9E5E-C87F72A83879/MyTestAppUITests-Runner.app/PlugIns/MyTestAppUITests.xctest
2016-04-03 19:07:39.879 XCTRunner[195:28521] No configurations found, creating a default configuration that will run all tests.
2016-04-03 19:07:39.993 XCTRunner[195:28521] XCTestConfigurationHook: Using …Run Code Online (Sandbox Code Playgroud) 我正在尝试列出 AWS Device Farm 中的项目。
这是我的代码:
const AWS = require('aws-sdk');
AWS.config.update({ region:'us-east-1' });
const credentials = new AWS.SharedIniFileCredentials({ profile: '***' });
AWS.config.credentials = credentials;
const devicefarm = new AWS.DeviceFarm();
async function run() {
let projects = await devicefarm.listProjects().promise();
console.log(projects);
}
run();
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
UnknownEndpoint:无法访问的主机:
devicefarm.us-east-1.amazonaws.com'.此服务可能在“us-east-1”区域不可用。
目前,亚马逊设备场不支持带有Appium的Robot框架.是否有解决办法或工具可以让我在亚马逊设备农场运行我的机器人脚本?
有没有办法在 CI 管道中的真实设备上运行 detox e2e 测试?
我的目标是在 AWS 设备场或类似的东西上运行测试。
我读到可以在 bitrise ci 上运行 e2e 测试,但我想它们将在 iOS 模拟器中执行,对吗?
任何提示表示赞赏。
我发现当我将 JUnit 5 测试上传到 AWS 时失败,因为它希望找到格式为junit-<ver>.jar. 但是,JUnit 5 已将包名称更改为org.junit.jupiter.ap和org.junit.platform.commons。
这是否意味着 AWS Device Farm 不支持 JUnit 5?有没有计划很快支持它?
\n我的 Appium + JUnit 测试在本地工作得很好,但在 aws 上找不到属性文件。我的测试位于 下src/test/java,测试中使用的属性文件位于src/test/resources/locale. \n包含依赖项内容的压缩包:
\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 app-0.1-tests.jar\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 app-0.1.jar\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 dependency-jars \n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 ...\nRun Code Online (Sandbox Code Playgroud)\n\napp-0.1-tests.jar内容:
\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 META-INF\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 MANIFEST.MF\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 maven\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 ....\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 com\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 ....\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 locale\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 en_EN.properties\nRun Code Online (Sandbox Code Playgroud)\n\n不幸的是,当我尝试加载属性文件时,出现 IOException - 文件未在以下位置找到:\nfile:/tmp/scratchcC4yMz.scratch/test-packagefQ2euI/app-0.1-tests.jar!/locale/en_EN.properties
每次遇到同样的问题时,我都尝试通过多种方式加载它们。在当地,一切都很有魅力。代码示例:
\n\nFile file = new File(ClassName.class.getResource("/locale/en_EN.properties").getPath());\ntry (InputStream inputStream = new FileInputStream(file.getPath());\nInputStreamReader streamReader = new InputStreamReader(inputStream, Charset.forName("UTF-8"))) {\n Properties properties = new Properties();\n properties.load(streamReader);\n return properties;\n} catch (IOException e) {\n System.err.println("Properties file not found: …Run Code Online (Sandbox Code Playgroud) 我有一个使用 cucumber-appium-ruby 的测试自动化套件,我在 AWS 设备场上运行它。为了提高性能(并避免每个设备 150 分钟的使用限制),我希望能够并行运行我的测试(意味着在不同设备上运行套件的不同测试)
我一直在寻找解决方案,或者如果可能的话,我发现的唯一实际解决方案是每次运行运行我的套件的不同部分。这并不理想,因为这不是真正的测试分片,我想知道它是否可以实现或者是否有人已经做到了。
我正在使用aws设备场来运行我的android测试,我们正在使用espresso框架.今天有些测试失败了,如果我的测试失败,我想拍摄截图.我已经阅读了您的文档,但找不到任何具体的内容.这是我目前所知道的:
您可以将截图作为Android UI Automator测试的一部分.
要截取屏幕截图,请调用takeScreenshot方法(例如,takeScreenshot("/ sdcard/uiautomator-screenshots/home-screen-1234.png");).
注意:所有屏幕截图都必须存储在
/sdcard/uiautomator-screenshots directory.您必须指定要存储的屏幕截图的完整路径(包括文件名).该takeScreenshot方法仅适用于API级别17及更高级别.对于API级别16,支持UI Automator,但不支持屏幕截图.
有没有什么办法可以配置aws device服务器场来自动截取屏幕截图而无需在测试中调用该功能?是否支持?此外,我找不到任何与屏幕截图相关的命令.如果有人能解释截图所需的步骤,我将非常感激.谢谢
android amazon-web-services android-espresso aws-device-farm
appium ×3
junit ×2
android ×1
automation ×1
detox ×1
ios ×1
mobile ×1
react-native ×1
ruby ×1
xcode ×1