简体   繁体   中英

Reading Log from android app through Robotium test project

I need to read the logs from the android application project through robotium test project. Please help me out.

Thanks

If you want to see the logs , Please use logcat, in Eclipse(that comes with android SDK).

Go To:

Window --> Show View --> other --> search LogCat

In LogCat you can see the logs for both Application under test and your test project. To use android's inbuilt logging library , you can do something like Log.d ("I am a Log"); In LogCat you can filter your preferred logs by creating a filter by clicking on the + button there.

If you want to wait for some log to appear or assert some log messages use the following methods:

solo.waitForLogMessage(String logMessage, int timeout);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM