Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 在多个设备上进行颤振UI测试(驱动)_Flutter_Integration Testing - Fatal编程技术网

Flutter 在多个设备上进行颤振UI测试(驱动)

Flutter 在多个设备上进行颤振UI测试(驱动),flutter,integration-testing,Flutter,Integration Testing,在驾驶带有颤振的UI测试时,是否有方法在设备之间切换? 我有一个应用程序可以同步所有实例的数据。典型的场景是ToDo应用程序。用户在手机上为自己创建一个待办事项,该待办事项将出现在他登录的桌子上。 有没有关于如何用颤振驱动实现自动化的想法?我基本上需要两个我的应用程序在测试时运行的实例。我已经弄明白了,有一种方法可以从macOS上的终端启动不同的模拟设备,并告诉Flatter wich one使用。因此,解决方案是为测试的不同步骤编写不同的文件,然后在脚本中逐个运行: enter code he

在驾驶带有颤振的UI测试时,是否有方法在设备之间切换? 我有一个应用程序可以同步所有实例的数据。典型的场景是ToDo应用程序。用户在手机上为自己创建一个待办事项,该待办事项将出现在他登录的桌子上。
有没有关于如何用颤振驱动实现自动化的想法?我基本上需要两个我的应用程序在测试时运行的实例。我已经弄明白了,有一种方法可以从macOS上的终端启动不同的模拟设备,并告诉Flatter wich one使用。因此,解决方案是为测试的不同步骤编写不同的文件,然后在脚本中逐个运行:

enter code here
open -a Simulator
xcrun simctl boot $iphone8_id
xcrun simctl boot $iphone8_id
sleep 10
# That works just great!
flutter drive --target=test_driver/app_1.dart --keep-app-running -d $iphone8_id
flutter drive --target=test_driver/app_2.dart --keep-app-running -d $iphone11_id
使用以下命令检查模拟器的所有设备id:

xcrun simctl list