Skip to content

Android UI test console logs

AppeliumTests lets your Android UI tests write their own log, separate from the logs of the app under test, and attaches it next to each test failure in the Appelium Dashboard. Log what the test is about to do and what it expects, and the failure report reads as a timeline. AppeliumTests also records Logcat automatically.

Use Appelium logs in your UI tests with the following methods:

1
2
3
4
5
6
AppeliumTests.Log.v("Verbose message")
AppeliumTests.Log.d("Debug message")
AppeliumTests.Log.i("Info message")
AppeliumTests.Log.w("Warning message")
AppeliumTests.Log.e("Error message")
AppeliumTests.Log.a("Assertion message")

all the logging levels allow you to pass an optional tag for even better granularity:

AppeliumTests.Log.i("Next button disabled", "Registration")

Logcat Logs

In addition to standard Appelium logs, AppeliumTests will automatically record all Logcat logs and attach them to each test failure. You can control this behavior by using AppeliumTests.Builder.setLogcatCaptureEnabled(true|false).