1

I found some CTS errors which are given below:

Compatibility Test Case: CtsAppTestCases
Package Name: android.app.cts.DialogTest

Error:

-- testContextMenu   fail   junit.framework.AssertionFailedError                      
                              at android.app.cts.DialogTest.testContextMenu(DialogTest.java: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)`
Daniel Kutik
  • 6,997
  • 2
  • 27
  • 34

1 Answers1

0

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.

Neeraj Nama
  • 1,562
  • 1
  • 18
  • 24