RobotiumTech / robotium

Android UI Testing
http://www.robotium.org
Apache License 2.0
2.86k stars 786 forks source link

Waiter.getLog doesn't throw Exception when logcat process encounter error #648

Closed renas closed 9 years ago

renas commented 9 years ago

From n...@orz.hk on January 07, 2014 20:05:07

What steps will reproduce the problem? 1. Remove READ_LOGS permission from project under test. On my environment the problem would happens even READ_LOGS permission is present in AndroidManifest.

  1. setup a test with memthod waitForLogMessage, e.g., mSolo.waitForLogMessage("some log")
  2. When the test run waitForLogMessage would return false, although "some log" has dumped to logcat. Error stream from logcat process would report "android Unable to open log device '/dev/log/main': Permission denied". What is the expected output? What do you see instead? Expect it to throw Exception when return value from Process is non-zero. The Exception message would be the error message from error stream. What version of the product are you using? On what operating system? Robotium 4.3.1. Android 4.4.2 on Samsusng S2 with CyanFox.

Original issue: http://code.google.com/p/robotium/issues/detail?id=569

renas commented 9 years ago

From renasr...@gmail.com on January 07, 2014 23:19:00

Thanks for reporting this. This will be included in the next release.

Status: Accepted
Owner: renasr...@gmail.com

renas commented 9 years ago

From n...@orz.hk on January 07, 2014 23:29:11

Hi,

Thanks. Is there any proper way so that I can submit code update for this issue?

Neo

renas commented 9 years ago

From n...@orz.hk on January 07, 2014 23:30:11

Ah, I found the code is host in github so I will submit code changes there.

renas commented 9 years ago

From renasr...@gmail.com on January 07, 2014 23:31:03

Great.

renas commented 9 years ago

From renasr...@gmail.com on March 16, 2014 23:08:54

Thanks for contributing. This has been included in 5.1.

Status: Verified