Automating Mobile App Accelerometer Data Testing

381 Views Asked by At

I am trying to create a test automation for my mobile app and I need to be able to simulate various accelerometer readings which would happen while the user is using the app.

I originally thought using ADB with and android emulator would work. However the command that is documented to work does not.

$ ./adb shell sensor set acceleration 1:1:1
/system/bin/sh: sensor: inaccessible or not found

Is there a specific software version or emulator or hardware which i need to use to enable the above command?

Can I do similar type tests with an iphone?

1

There are 1 best solutions below

1
Ashutosh Jalan On

you are using the wrong command, sensor set accelerometer is an emulator console command for which you have to use ./adb emu sensor set acceleration 1:1:1 command.

This will help you understand, https://helpmanual.io/help/adb/