leancodepl / patrol

Flutter-first UI testing framework. Ready for action!
https://patrol.leancode.co
Apache License 2.0
860 stars 127 forks source link

Add option for defining desired device capabilities #31

Closed mateuszwojtczak closed 1 year ago

mateuszwojtczak commented 2 years ago

What if the user wants to run tests on all Android devices? What if the user wants to run tests on all devices that can be called "a tablet"?

Appium has this kind of device capabilities definition, maybe we want to do something like that, obviously in a simplified form (especially in the beginning)

AC: user can select any device with Android version 12

bartekpacia commented 2 years ago

I think we can use adb shell getprop for this.

Output for Pixel 3a API ``` [build.version.extensions.r]: [0] [cache_key.bluetooth.get_bond_state]: [4894361924647458041] [cache_key.bluetooth.get_profile_connection_state]: [4894361924647458044] [cache_key.bluetooth.get_state]: [4894361924647458045] [cache_key.bluetooth.is_offloaded_filtering_supported]: [4894361924647458040] [cache_key.display_info]: [3089266867027919483] [cache_key.has_system_feature]: [3089266867027919477] [cache_key.is_compat_change_enabled]: [3089266867027919479] [cache_key.is_interactive]: [3089266867027919468] [cache_key.is_power_save_mode]: [3089266867027919486] [cache_key.is_user_unlocked]: [3089266867027919492] [cache_key.location_enabled]: [3089266867027919487] [cache_key.package_info]: [3089266867027919493] [cache_key.telephony.get_active_data_sub_id]: [5937398275787309938] [cache_key.telephony.get_default_data_sub_id]: [5937398275787309898] [cache_key.telephony.get_default_sms_sub_id]: [5937398275787309904] [cache_key.telephony.get_default_sub_id]: [5937398275787309902] [cache_key.telephony.get_slot_index]: [5937398275787309903] [dalvik.vm.appimageformat]: [lz4] [dalvik.vm.dex2oat-Xms]: [64m] [dalvik.vm.dex2oat-Xmx]: [512m] [dalvik.vm.dex2oat-max-image-block-size]: [524288] [dalvik.vm.dex2oat-minidebuginfo]: [true] [dalvik.vm.dex2oat-resolve-startup-strings]: [true] [dalvik.vm.dex2oat-updatable-bcp-packages-file]: [/system/etc/updatable-bcp-packages.txt] [dalvik.vm.dexopt.secondary]: [true] [dalvik.vm.heapgrowthlimit]: [192m] [dalvik.vm.heapmaxfree]: [8m] [dalvik.vm.heapminfree]: [512k] [dalvik.vm.heapsize]: [512m] [dalvik.vm.heapstartsize]: [8m] [dalvik.vm.heaptargetutilization]: [0.75] [dalvik.vm.image-dex2oat-Xms]: [64m] [dalvik.vm.image-dex2oat-Xmx]: [64m] [dalvik.vm.isa.arm64.features]: [default] [dalvik.vm.isa.arm64.variant]: [generic] [dalvik.vm.minidebuginfo]: [true] [dalvik.vm.usejit]: [true] [dalvik.vm.usejitprofiles]: [true] [debug.atrace.tags.enableflags]: [0] [debug.force_rtl]: [false] [debug.hwui.renderer]: [skiagl] [debug.sf.vsync_reactor]: [0] [debug.stagefright.ccodec]: [4] [debug.tracing.screen_brightness]: [0.39763778] [dev.bootcomplete]: [1] [dev.mnt.blk.data]: [dm-4] [dev.mnt.blk.data.user.0]: [dm-4] [dev.mnt.blk.data_mirror.cur_profiles]: [dm-4] [dev.mnt.blk.data_mirror.data_ce.null]: [dm-4] [dev.mnt.blk.data_mirror.data_ce.null.0]: [dm-4] [dev.mnt.blk.data_mirror.data_de.null]: [dm-4] [dev.mnt.blk.mnt.androidwritable.0.emulated.0.Android.data]: [dm-4] [dev.mnt.blk.mnt.androidwritable.0.emulated.0.Android.obb]: [dm-4] [dev.mnt.blk.mnt.installer.0.emulated.0.Android.data]: [dm-4] [dev.mnt.blk.mnt.installer.0.emulated.0.Android.obb]: [dm-4] [dev.mnt.blk.mnt.pass_through.0.emulated]: [dm-4] [dev.mnt.blk.mnt.user.0.emulated.0.Android.data]: [dm-4] [dev.mnt.blk.mnt.user.0.emulated.0.Android.obb]: [dm-4] [dev.mnt.blk.product]: [dm-2] [dev.mnt.blk.root]: [dm-0] [dev.mnt.blk.storage.emulated.0.Android.data]: [dm-4] [dev.mnt.blk.storage.emulated.0.Android.obb]: [dm-4] [dev.mnt.blk.system_ext]: [dm-1] [dev.mnt.blk.vendor]: [dm-3] [drm.service.enabled]: [true] [gsm.current.phone-type]: [1] [gsm.network.type]: [LTE] [gsm.operator.alpha]: [Android] [gsm.operator.iso-country]: [us] [gsm.operator.isroaming]: [false] [gsm.operator.numeric]: [310260] [gsm.sim.operator.alpha]: [T-Mobile] [gsm.sim.operator.iso-country]: [us] [gsm.sim.operator.numeric]: [310260] [gsm.sim.state]: [LOADED] [gsm.version.baseband]: [1.0.0.0] [gsm.version.ril-impl]: [android reference-ril 1.0] [hwservicemanager.ready]: [true] [init.svc.adbd]: [running] [init.svc.apexd]: [running] [init.svc.apexd-bootstrap]: [stopped] [init.svc.apexd-snapshotde]: [stopped] [init.svc.audioserver]: [running] [init.svc.bootanim]: [stopped] [init.svc.boringssl_self_test64]: [stopped] [init.svc.boringssl_self_test64_vendor]: [stopped] [init.svc.boringssl_self_test_apex64]: [stopped] [init.svc.bpfloader]: [stopped] [init.svc.cameraserver]: [running] [init.svc.create_router_ns]: [running] [init.svc.credstore]: [running] [init.svc.derive_sdk]: [stopped] [init.svc.dhcpclient_rtr]: [running] [init.svc.drm]: [running] [init.svc.emu_hostapd]: [running] [init.svc.gatekeeperd]: [running] [init.svc.goldfish-logcat]: [running] [init.svc.gpu]: [running] [init.svc.health-hal-2-1]: [running] [init.svc.heapprofd]: [stopped] [init.svc.hidl_memory]: [running] [init.svc.hwservicemanager]: [running] [init.svc.idmap2d]: [stopped] [init.svc.incidentd]: [running] [init.svc.installd]: [running] [init.svc.iorapd]: [running] [init.svc.keystore]: [running] [init.svc.lmkd]: [running] [init.svc.logd]: [running] [init.svc.logd-auditctl]: [stopped] [init.svc.logd-reinit]: [stopped] [init.svc.mdnsd]: [running] [init.svc.media]: [running] [init.svc.media.swcodec]: [running] [init.svc.mediadrm]: [running] [init.svc.mediaextractor]: [running] [init.svc.mediametrics]: [running] [init.svc.netd]: [running] [init.svc.netmgr]: [running] [init.svc.neuralnetworks_hal_service_sample_all]: [running] [init.svc.neuralnetworks_hal_service_sample_float_fast]: [running] [init.svc.neuralnetworks_hal_service_sample_float_slow]: [running] [init.svc.neuralnetworks_hal_service_sample_minimal]: [running] [init.svc.neuralnetworks_hal_service_sample_quant]: [running] [init.svc.qemu-props]: [running] [init.svc.ranchu-net]: [stopped] [init.svc.ranchu-setup]: [stopped] [init.svc.servicemanager]: [running] [init.svc.statsd]: [running] [init.svc.storaged]: [running] [init.svc.surfaceflinger]: [running] [init.svc.system_suspend]: [running] [init.svc.tombstoned]: [running] [init.svc.traced]: [running] [init.svc.traced_perf]: [stopped] [init.svc.traced_probes]: [running] [init.svc.ueventd]: [running] [init.svc.update_verifier_nonencrypted]: [stopped] [init.svc.usbd]: [stopped] [init.svc.vold]: [running] [init.svc.wait_for_keymaster]: [stopped] [init.svc.wifi_forwarder]: [running] [init.svc.wificond]: [running] [init.svc.wpa_supplicant]: [running] [init.svc.zygote]: [running] [log.tag.APM_AudioPolicyManager]: [D] [log.tag.stats_log]: [I] [media.mediadrmservice.enable]: [true] [net.bt.name]: [Android] [net.qtaguid_enabled]: [1] [net.tcp.default_init_rwnd]: [60] [persist.sys.boot.reason]: [] [persist.sys.boot.reason.history]: [reboot,1654683784 reboot,1654586702 reboot,1654553299 reboot,1654526515] [persist.sys.dalvik.vm.lib.2]: [libart.so] [persist.sys.device_provisioned]: [1] [persist.sys.disable_rescue]: [true] [persist.sys.displayinset.top]: [0] [persist.sys.fflag.override.settings_fuse]: [true] [persist.sys.fuse]: [true] [persist.sys.gps.lpp]: [2] [persist.sys.isolated_storage]: [true] [persist.sys.lmk.reportkills]: [true] [persist.sys.locale]: [pl-PL] [persist.sys.timezone]: [Europe/Warsaw] [persist.sys.usb.config]: [adb] [persist.sys.zram_enabled]: [1] [persist.traced.enable]: [1] [pm.dexopt.ab-ota]: [speed-profile] [pm.dexopt.bg-dexopt]: [speed-profile] [pm.dexopt.boot]: [verify] [pm.dexopt.first-boot]: [quicken] [pm.dexopt.inactive]: [verify] [pm.dexopt.install]: [speed-profile] [pm.dexopt.shared]: [speed] [qemu.adb.secure]: [1] [qemu.hw.mainkeys]: [0] [qemu.logcat]: [start] [qemu.networknamespace]: [ready] [qemu.sf.fake_camera]: [front] [qemu.sf.lcd_density]: [440] [qemu.timezone]: [Europe/Warsaw] [ro.actionable_compatible_property.enabled]: [true] [ro.adb.secure]: [1] [ro.allow.mock.location]: [0] [ro.apex.updatable]: [true] [ro.baseband]: [unknown] [ro.board.platform]: [] [ro.boot.boot_devices]: [a003600.virtio_mmio] [ro.boot.bootreason]: [reboot] [ro.boot.dynamic_partitions]: [true] [ro.boot.hardware]: [ranchu] [ro.boot.serialno]: [EMULATOR31X2X10X0] [ro.boot.vbmeta.digest]: [5b0660ee07ebdd54b3f7aeffd167414d1dc327187450044a28d14525d0d6c9c0] [ro.boot.vbmeta.hash_alg]: [sha256] [ro.boot.vbmeta.size]: [6784] [ro.bootimage.build.date]: [Mon Aug 2 17:49:27 UTC 2021] [ro.bootimage.build.date.utc]: [1627926567] [ro.bootimage.build.fingerprint]: [google/sdk_gphone_arm64/emulator_arm64:11/RSR1.210722.003/7604015:user/release-keys] [ro.bootloader]: [unknown] [ro.bootmode]: [unknown] [ro.build.characteristics]: [emulator] [ro.build.date]: [Mon Aug 2 17:49:27 UTC 2021] [ro.build.date.utc]: [1627926567] [ro.build.description]: [sdk_gphone_arm64-user 11 RSR1.210722.003 7604015 release-keys] [ro.build.display.id]: [RSR1.210722.003] [ro.build.fingerprint]: [google/sdk_gphone_arm64/emulator_arm64:11/RSR1.210722.003/7604015:user/release-keys] [ro.build.flavor]: [sdk_gphone_arm64-user] [ro.build.host]: [abfarm-01164] [ro.build.id]: [RSR1.210722.003] [ro.build.product]: [emulator_arm64] [ro.build.tags]: [release-keys] [ro.build.type]: [user] [ro.build.user]: [android-build] [ro.build.version.all_codenames]: [REL] [ro.build.version.base_os]: [] [ro.build.version.codename]: [REL] [ro.build.version.incremental]: [7604015] [ro.build.version.min_supported_target_sdk]: [23] [ro.build.version.preview_sdk]: [0] [ro.build.version.preview_sdk_fingerprint]: [REL] [ro.build.version.release]: [11] [ro.build.version.release_or_codename]: [11] [ro.build.version.sdk]: [30] [ro.build.version.security_patch]: [2021-08-05] [ro.carrier]: [unknown] [ro.com.android.dataroaming]: [true] [ro.com.google.acsa]: [true] [ro.com.google.locationfeatures]: [1] [ro.config.alarm_alert]: [Alarm_Classic.ogg] [ro.config.notification_sound]: [pixiedust.ogg] [ro.config.ringtone]: [Ring_Synth_04.ogg] [ro.control_privapp_permissions]: [enforce] [ro.cp_system_other_odex]: [0] [ro.crypto.dm_default_key.options_format.version]: [2] [ro.crypto.metadata.enabled]: [true] [ro.crypto.state]: [encrypted] [ro.crypto.type]: [file] [ro.crypto.uses_fs_ioc_add_encryption_key]: [true] [ro.crypto.volume.filenames_mode]: [aes-256-cts] [ro.dalvik.vm.native.bridge]: [0] [ro.debuggable]: [0] [ro.hardware]: [ranchu] [ro.hardware.audio.primary]: [goldfish] [ro.hardware.egl]: [emulation] [ro.hardware.power]: [ranchu] [ro.hardware.vulkan]: [ranchu] [ro.hwui.use_vulkan]: [] [ro.iorapd.enable]: [true] [ro.kernel.android.qemud]: [1] [ro.kernel.androidboot.boot_devices]: [a003600.virtio_mmio] [ro.kernel.androidboot.hardware]: [ranchu] [ro.kernel.androidboot.serialno]: [EMULATOR31X2X10X0] [ro.kernel.androidboot.vbmeta.digest]: [5b0660ee07ebdd54b3f7aeffd167414d1dc327187450044a28d14525d0d6c9c0] [ro.kernel.androidboot.vbmeta.hash_alg]: [sha256] [ro.kernel.androidboot.vbmeta.size]: [6784] [ro.kernel.cma]: [294M@0-4G] [ro.kernel.console]: [0] [ro.kernel.earlyprintk]: [ttyAMA0] [ro.kernel.loop.max_part]: [7] [ro.kernel.mac80211_hwsim.channels]: [2] [ro.kernel.mac80211_hwsim.radios]: [0] [ro.kernel.ndns]: [3] [ro.kernel.printk.devkmsg]: [on] [ro.kernel.qemu]: [1] [ro.kernel.qemu.avd_name]: [Pixel_3a_API_30] [ro.kernel.qemu.camera_hq_edge_processing]: [0] [ro.kernel.qemu.camera_protocol_ver]: [1] [ro.kernel.qemu.dalvik.vm.heapsize]: [512m] [ro.kernel.qemu.encrypt]: [1] [ro.kernel.qemu.gles]: [1] [ro.kernel.qemu.gltransport]: [pipe] [ro.kernel.qemu.gltransport.drawFlushInterval]: [800] [ro.kernel.qemu.opengles.version]: [196608] [ro.kernel.qemu.settings.system.screen_off_timeout]: [2147483647] [ro.kernel.qemu.uirenderer]: [skiagl] [ro.kernel.qemu.vsync]: [60] [ro.kernel.qemu.wifi]: [1] [ro.lmk.kill_timeout_ms]: [100] [ro.lockscreen.disable.default]: [1] [ro.logd.size]: [1M] [ro.logd.size.stats]: [64K] [ro.nnapi.extensions.deny_on_product]: [true] [ro.odm.build.date]: [Mon Aug 2 17:49:27 UTC 2021] [ro.odm.build.date.utc]: [1627926567] [ro.odm.build.fingerprint]: [google/sdk_gphone_arm64/emulator_arm64:11/RSR1.210722.003/7604015:user/release-keys] [ro.odm.build.version.incremental]: [7604015] [ro.opengles.version]: [196608] [ro.organization_owned]: [false] [ro.postinstall.fstab.prefix]: [/system] [ro.product.board]: [goldfish_arm64] [ro.product.brand]: [google] [ro.product.build.date]: [Mon Aug 2 17:49:27 UTC 2021] [ro.product.build.date.utc]: [1627926567] [ro.product.build.fingerprint]: [google/sdk_gphone_arm64/emulator_arm64:11/RSR1.210722.003/7604015:user/release-keys] [ro.product.build.id]: [RSR1.210722.003] [ro.product.build.tags]: [release-keys] [ro.product.build.type]: [user] [ro.product.build.version.incremental]: [7604015] [ro.product.build.version.release]: [11] [ro.product.build.version.release_or_codename]: [11] [ro.product.build.version.sdk]: [30] [ro.product.cpu.abi]: [arm64-v8a] [ro.product.cpu.abilist]: [arm64-v8a] [ro.product.cpu.abilist32]: [] [ro.product.cpu.abilist64]: [arm64-v8a] [ro.product.device]: [emulator_arm64] [ro.product.first_api_level]: [30] [ro.product.locale]: [en-US] [ro.product.manufacturer]: [Google] [ro.product.model]: [sdk_gphone_arm64] [ro.product.name]: [sdk_gphone_arm64] [ro.product.odm.brand]: [google] [ro.product.odm.device]: [emulator_arm64] [ro.product.odm.manufacturer]: [Google] [ro.product.odm.model]: [sdk_gphone_arm64] [ro.product.odm.name]: [sdk_gphone_arm64] [ro.product.product.brand]: [google] [ro.product.product.device]: [emulator_arm64] [ro.product.product.manufacturer]: [Google] [ro.product.product.model]: [sdk_gphone_arm64] [ro.product.product.name]: [sdk_gphone_arm64] [ro.product.system.brand]: [google] [ro.product.system.device]: [generic] [ro.product.system.manufacturer]: [Google] [ro.product.system.model]: [mainline] [ro.product.system.name]: [mainline] [ro.product.system_ext.brand]: [google] [ro.product.system_ext.device]: [emulator_arm64] [ro.product.system_ext.manufacturer]: [Google] [ro.product.system_ext.model]: [sdk_gphone_arm64] [ro.product.system_ext.name]: [sdk_gphone_arm64] [ro.product.vendor.brand]: [google] [ro.product.vendor.device]: [emulator_arm64] [ro.product.vendor.manufacturer]: [Google] [ro.product.vendor.model]: [sdk_gphone_arm64] [ro.product.vendor.name]: [sdk_gphone_arm64] [ro.product.vndk.version]: [30] [ro.property_service.version]: [2] [ro.revision]: [0] [ro.secure]: [1] [ro.serialno]: [EMULATOR31X2X10X0] [ro.setupwizard.mode]: [DISABLED] [ro.system.build.date]: [Mon Aug 2 17:49:27 UTC 2021] [ro.system.build.date.utc]: [1627926567] [ro.system.build.fingerprint]: [google/sdk_gphone_arm64/emulator_arm64:11/RSR1.210722.003/7604015:user/release-keys] [ro.system.build.id]: [RSR1.210722.003] [ro.system.build.tags]: [release-keys] [ro.system.build.type]: [user] [ro.system.build.version.incremental]: [7604015] [ro.system.build.version.release]: [11] [ro.system.build.version.release_or_codename]: [11] [ro.system.build.version.sdk]: [30] [ro.system_ext.build.date]: [Mon Aug 2 17:49:27 UTC 2021] [ro.system_ext.build.date.utc]: [1627926567] [ro.system_ext.build.fingerprint]: [google/sdk_gphone_arm64/emulator_arm64:11/RSR1.210722.003/7604015:user/release-keys] [ro.system_ext.build.id]: [RSR1.210722.003] [ro.system_ext.build.tags]: [release-keys] [ro.system_ext.build.type]: [user] [ro.system_ext.build.version.incremental]: [7604015] [ro.system_ext.build.version.release]: [11] [ro.system_ext.build.version.release_or_codename]: [11] [ro.system_ext.build.version.sdk]: [30] [ro.treble.enabled]: [true] [ro.vendor.build.date]: [Mon Aug 2 17:49:27 UTC 2021] [ro.vendor.build.date.utc]: [1627926567] [ro.vendor.build.fingerprint]: [google/sdk_gphone_arm64/emulator_arm64:11/RSR1.210722.003/7604015:user/release-keys] [ro.vendor.build.security_patch]: [] [ro.vendor.build.version.incremental]: [7604015] [ro.vendor.build.version.sdk]: [30] [ro.vndk.version]: [30] [ro.wifi.channels]: [] [ro.zygote]: [zygote64_32] [ro.zygote.disable_gl_preload]: [1] [security.perf_harden]: [1] [selinux.restorecon_recursive]: [/data/misc_ce/0] [service.bootanim.exit]: [1] [service.sf.present_timestamp]: [1] [sys.boot.reason]: [reboot] [sys.boot.reason.last]: [reboot] [sys.boot_completed]: [1] [sys.bootstat.first_boot_completed]: [1] [sys.init.perf_lsm_hooks]: [1] [sys.isolated_storage_snapshot]: [true] [sys.rescue_boot_count]: [1] [sys.retaildemo.enabled]: [0] [sys.sysctl.extra_free_kbytes]: [28096] [sys.sysctl.tcp_def_init_rwnd]: [60] [sys.system_server.start_count]: [1] [sys.system_server.start_elapsed]: [10622] [sys.system_server.start_uptime]: [10622] [sys.usb.config]: [adb] [sys.usb.configfs]: [0] [sys.usb.controller]: [dummy_udc.0] [sys.usb.state]: [adb] [sys.use_memfd]: [false] [sys.user.0.ce_available]: [true] [sys.wifitracing.started]: [1] [vendor.qemu.dev.bootcomplete]: [1] [vold.has_adoptable]: [1] [vold.has_quota]: [1] [vold.has_reserved]: [1] [vold.post_fs_data_done]: [1] [wifi.direct.interface]: [p2p-dev-wlan0] [wifi.interface]: [wlan0] ```
mateuszwojtczak commented 2 years ago

This looks like a good place to start!

bartekpacia commented 1 year ago

Not relevant now.

We might take a fresh look at this features in a few months.

github-actions[bot] commented 10 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.