Possible for Android JUnit test to create a config file in the target apps data directory?

StackOverflow https://stackoverflow.com//questions/9566622

  •  06-12-2019
  •  | 
  •  

문제

I would like my Robotium test to create a configuration file for the application I am testing to read. The file would be located in the internal storage /data directory associated with the tested application.

Is this possible? At the moment I am getting a "Permission denied" error.

도움이 되었습니까?

해결책 2

It is actually possible to create files in data storage outside of an applications designated area. However, if these files are already generated by the target application, they must have WRITABLE permissions to enable the test application to modify them.

In my case my application does not generate the files, so this is not a problem.

다른 팁

Write shell script and push your file with adb root command. If that doest not help you -create file inside your test.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top