How we can Find cause of CTS Error?
I found some CTS errors which are given below:
Compatibility Test Case: CtsAppTestCases
android.app.cts.DialogTest
Error:
-- testContextMenu fail junit.framework.AssertionFailedError
at android.app.cts.DialogTest.testContextMenu(DialogTest.ja开发者_StackOverflow社区va:971)`
-- testTabScreen fail java.lang.RuntimeException: Intent {
act=Activity lifecycle incorrect: received
onResume but expected onStop at 5 }
at android.app.cts.ActivityTestsBase.waitForResultOrThrow(ActivityTestsBase.java:149)
-- testTabScreen fail java.lang.RuntimeException: Intent {
act=Activity lifecycle incorrect: received
onResume but expected onStop at 5 }
at android.app.cts.ActivityTestsBase.waitForResultOrThrow(ActivityTestsBase.java:149)
-- testScreen fail java.lang.RuntimeException: Intent { act=Activity
lifecycle incorrect: received onResume but expected onStop
at 5 }
at android.app.cts.ActivityTestsBase.waitForResultOrThrow(ActivityTestsBase.java:149)`
This Test is expecting the lifecycle as onPause() then onStop(), but onResme() was called rather than onStop(). According to Android Activity Docs – “After receiving this call you will usually receive a following call to onStop() (after the next activity has been resumed and displayed), however in some cases there will be a direct call back to onResume() without going through the stopped state.” So, it is not mandatory to get desired sequence.
精彩评论