Commit Graph

155 Commits

Author SHA1 Message Date
TreeHugger Robot
608a439238 Merge "Split flicker tests into groups" into sc-dev 2021-05-22 09:44:36 +00:00
Nataniel Borges
8aaaeea849 Split flicker tests into groups
The flicker test suite grew and now trigger a treehuger SLO violation. To address this problem create different groups for different tests using: --module-arg <TEST SUITE>:include-annotation:<GROUP>

Where:
   <TEST SUITE> = FlickerTests or WMShellFlickerTests
   <GROUP> = com.android.server.wm.flicker.annotation.Group1 or com.android.server.wm.flicker.annotation.Group2 or com.android.server.wm.flicker.annotation.Group3

For example:

1) to run only tests in the first group in flicker use: `--module-arg FlickerTests:include-annotation:com.android.server.wm.flicker.annotation.Group1`

2) to run only the third group of tests from wmshell flicker: ``--module-arg FlickerTests:include-annotation:com.android.server.wm.flicker.annotation.Group3`

Bug: 180620475
Test: atest FlickerTests WMShellFlickerTests with the respective parameters
Change-Id: I82f668713ba262bafe2758e2c618bfc060cc2c8a
2021-05-20 09:36:44 +02:00
Chris Li
30248a1952 Determine whether to support activities in multi window (9/n)
When a Task is detached but is still stored as a recent Task, it should
be allowed to launched into split screen.

Bug: 176061101
Test: atest WMShellFlickerTests:EnterSplitScreenFromDetachedRecentTask
Test: atest WmTests:RecentTasksTest
Change-Id: Ic72901ca76f4acb6e68926062675ecc290b399be
2021-05-18 21:07:52 +00:00
Jerry Chang
68667bdd3a Merge "Fix wrong split bounds in legacy split flicker tests" into sc-dev 2021-05-14 02:29:18 +00:00
Jerry Chang
93edc1eae5 Fix wrong split bounds in legacy split flicker tests
Fix: 188013792
Test: passed presubmit
Change-Id: I675633a078d172f9c8cd836980658c4f2aa2d246
2021-05-13 16:23:42 +08:00
Chris Li
43d99647e4 Determine whether to support activities in multi window (5/n)
Update Task/ActivityRecord to use the new elgibility check and update
tests

Bug: 176061101
Test: pass existing
Change-Id: Ibb78a43d5901a604b02904be0a0bfdc6da0eb421
2021-05-11 04:20:49 +00:00
Chris Li
f9c4ee1fd3 Merge "Move legacy split screen flicker tests for non-resizable to presubmit" into sc-dev 2021-04-29 17:49:15 +00:00
Nataniel Borges
8a26f00f1f Merge "Fix pip window visibility assertions" into sc-dev 2021-04-29 15:51:59 +00:00
TreeHugger Robot
c8a0871269 Merge "Disable flaky app pair assertions" into sc-dev 2021-04-29 15:18:23 +00:00
Nataniel Borges
4b2f1da126 Fix pip window visibility assertions
1) Fix `Could not find: PipApp`, the test previously used the launcher name, instead of the window name for assertion

2) The command previously missed a `verify` call to actually execute the assertion

Bug: 186115871
Bug: 186445782
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Ie9274e273bcda2be24491705cd28d7dc0d5ea5db
2021-04-29 12:02:31 +02:00
Chris Li
2e02036650 Move legacy split screen flicker tests for non-resizable to presubmit
Fix: 182235458
Test: pass existing
Change-Id: Ia139972beae25fcb60dc68c11c2d50efc38e00cf
2021-04-28 16:46:58 +00:00
TreeHugger Robot
da2192eacf Merge "Disable flaky pip/app close tests (flicker)" into sc-dev 2021-04-28 10:13:57 +00:00
Nataniel Borges
d825929c73 Disable flaky app pair assertions
Assertion is flaky in presubmit

Bug: 186510496
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Ic796c86d555376283adbcdb06ea80c6d9ddbfe07
2021-04-28 10:05:16 +02:00
Chris Li
4bc72c96db Merge "Fix EnterSplitScreenNotSupportNonResizable flaky" into sc-dev 2021-04-27 19:50:35 +00:00
Nataniel Borges
73e2773099 Disable flaky pip/app close tests (flicker)
Some tests are still flaky and affecting presubmit

Bug: 185400889
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I477799646791c69b71c6f29d71e87caba900a983
2021-04-27 14:58:56 +02:00
Chris Li
55a68d161b Fix EnterSplitScreenNotSupportNonResizable flaky
Before, it called openQuickstep before canSplitScreen, but the later one
is also calling openQuickstep. This caused the recent is pressed twice
to introduce the flakness.

Test: atest WMShellFlickerTests:EnterSplitScreenNotSupportNonResizable
Bug: 182235458
Change-Id: Iba5af5114fd8883b73d78ac34e6f891ee8ca798f
2021-04-23 21:50:14 -07:00
Nataniel Borges
91b6830e38 Disable flaky flicker tests
Some tests are still flaky and affecting presubmit

Bug: 185400889
Bug: 186119282
Bug: 186115871
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Ie4e21d01d5ea7586f88470543321ce26ed74afa6
2021-04-22 19:10:04 +02:00
Chris Li
1ca437909f Fix flaky legacy split screen flicker tests
Bug: 182235458
Test: pass existing
Change-Id: I20e957b0bfcacb37c1ad72b4a8cea155eeee911a
2021-04-19 18:25:26 -07:00
Nataniel Borges
f226bc0878 Remove quicksearchbox from home window list
Previously Winscope considered only the `isVisible` property to determine if the window was visible or not. This failed in cases such as `com.google.android.googlequicksearchbox/android.app.ContextImpl` when launching apps, where `isVisible=true` and `alpha=0`

Bug: 181630910
Bug: 182720234
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I75fab0c6de02e43265002986901353f8e230baa5
2021-04-15 17:50:34 +02:00
Nataniel Borges
c258d7f4ca Disable some trace assertions
Previously some assertions didn't run on the whole trace because of a missing `forAllEntries` statement in the library. When activating this statement these tests fail and should be disabled.

Test: atest FlickerTests WMShellFlickerTests
Bug: 183547024
Bug: 181630910
Change-Id: I28f92e2d9de1a5465a4da5971c438bc4c0b311f9
2021-04-13 20:55:39 +02:00
Nataniel Borges
e852b071ff Fix use of NavigationModeRule on flicker
The method was ignored before and now should be activated to enable 3 button mode. Some tests become flaky in 3-button mode and should be disabled for the moment.

Test: atest FlickerTests WMShellFlickerTests
Bug: 162925924
Change-Id: Ife24ad85c302da6fc193f1a5a226722cfed51b2b
2021-04-12 15:15:56 +02:00
Hongwei Wang
c5d831fea1 Flicker test for PiP and launcher shelf height
PipMovesInAllApps was intended to test the PiP window movement when the
shelf height of Launcher changes and breaks with the recent `Device
search` feature that opening all-apps in Launcher triggers both IME and
shelf height change.

Since PipKeyboardTest has covered PiP movement with IME, reimplement
this by launching a new app instead of going to all-apps and also rename
this test for its intention.

Bug: 184050344
Test: atest WMShellFlickerTests:PipShelfHeightTest
Change-Id: I102ea95e6e91c9707b73587282702b868eb705fb
2021-03-31 13:38:10 -07:00
Nataniel Borges
400197ade7 Merge changes from topic "remove-all-tasks" into sc-dev
* changes:
  Ensure apps not running on cold launch test
  Remove all tasks before flicker tests
2021-03-31 16:54:05 +00:00
Nataniel Borges
2935ef01dc Merge "Move Pip assertions to flickerlib" into sc-dev 2021-03-31 07:54:24 +00:00
Nataniel Borges
61c3ea1789 Move Pip assertions to flickerlib
Previously the assertions were part of WMShell, however it is easier to keep them in the library as they can be used in other projects

Test: atest FlickerTests WMShellFlickerTests
Bug: 162925924
Change-Id: Ia6ca7cce1da81be2b73166acce40218bc304a77a
2021-03-30 23:11:41 +02:00
Hongwei Wang
6c9640f8b3 Merge "Disable PipMovesInAllApps temporarily" into sc-dev 2021-03-30 19:27:00 +00:00
Nataniel Borges
ba72075844 Remove all tasks before flicker tests
Ensures no other tasks are executing (cleanup) when a flicker test states to mitigate flakiness

Test: atest FlickerTests WMShellFlickerTests
Bug: 162925924
Change-Id: I84f712c8aba13ac845b9467f6c9753bc91e21a27
2021-03-30 21:19:08 +02:00
Hongwei Wang
722871b3e4 Disable PipMovesInAllApps temporarily
Test's currently failing due to the new `device search`, disable for
now to unblock presubmit and re-enable once we have a working solution.

Bug: 184050344
Test: atest WMShellFlickerTests:com.android.wm.shell.flicker.pip
Change-Id: I6b75ea213b442400090ee0a3f2b7e46ee5ecd395
2021-03-30 17:01:41 +00:00
Nataniel Borges
887a3c9d38 Introduce a subject to assert changes over rectangles
In several flicker tests it is necessary to check if a window or layer position is moving or resizing.

To facilitate these checks this CL introduces RectSubject (accessible through WindowStateSubject and LayerSubject) to assert rectangle behaviors

Bug: 174238224
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Id568fd9dbd59f176eeb84323c321553221932685
2021-03-29 22:33:41 +02:00
Chris Li
667d242404 Merge "Fix non-resizable split flicker tests" into sc-dev 2021-03-19 03:19:26 +00:00
Chris Li
c40cb1103a Fix non-resizable split flicker tests
1. Update the flag of DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW
during tests.

2. Before, the tests only checked whether the app window/layer became
visible/invisible, which could also happen during opening recent. Now,
we also check the visibility at the end.

Bug: 182235458
Test: atest WMShellFlickerTests
Change-Id: Ibc7b359d600a0e4105cc3a84b3111d59813eb9f1
2021-03-18 13:35:54 -07:00
Nataniel Borges
1a3724eced Promote stable PIP app tests to presubmit
These flaky tests have been stable for the past week and can be promoted

Test: atest WMShellFlickerTests:com.android.wm.shell.flicker.pip
Bug: 171049720
Bug: 167521849
Change-Id: Ibd78e9d9e53a5712ca781b265b1b65c830a74c08
2021-03-18 11:10:32 +01:00
Nataniel Borges
8b15b01c43 Remove Snapshot and Splash Screen from consecutive entry check
It is already possible to ignore windows/layers on the verification of  visibleWindowsShownMoreThanOneConsecutiveEntry and visibleLayersShownMoreThanOneConsecutiveEntry. However many tests need to manually add the Snapshot and Splash Screen entries.

Those entries are not guaranteed to show for more than 1 entry, they depend on the app behavior and when the SF actually renders the information sent by WM.

This CL removes those windows by default from the verification and refactor the tests to make it easier to update in the future

Test: atest FlickerTests WMShellFlickerTests
Bug: 182720234
Change-Id: I0e3346e078515b3e9a2065256ac04696acfa59fb
2021-03-16 10:26:55 +01:00
Nataniel Borges
1f9f16f880 Merge "Promote PIP postsubmit tests to presubmit" into sc-dev 2021-03-15 16:03:48 +00:00
Chris Li
f834092444 Allow non-resizable to enter split screen from recent
Before, LegacySplitScreen is not allowing non-resizable to enter split
screen. Now, it also checks supportsNonResizableMultiWindow.

Fix: 181377395
Bug: 176061101
Test: manual
Change-Id: Iae4c65b5c8b0a139dbf8af55caba9f6c99d1f470
2021-03-12 16:04:11 -08:00
Nataniel Borges
920cf61139 Merge "New enter pip assertion" into sc-dev 2021-03-12 16:35:46 +00:00
Nataniel Borges
575f4bf38f Merge "Generalize pip transitions and assertions" into sc-dev 2021-03-12 16:34:52 +00:00
Nataniel Borges
bfc834eeea Merge "Generalize apppairs assertions" into sc-dev 2021-03-12 16:34:42 +00:00
Nataniel Borges
9bc15837b6 Promote PIP postsubmit tests to presubmit
The tests have been stable for the past 2 weeks in postsubmit and can be promoted to presubmit

Test: atest FlickerTests:com.android.wm.shell.flicker.pip
Bug: 174238224
Change-Id: Ie7cbd56940e4b5eacd25ba38d1fd0a5966b9a7e9
2021-03-12 15:05:34 +01:00
Nataniel Borges
8923c65435 Merge "Log WM trace on frame instead of transaction" into sc-dev 2021-03-12 09:40:15 +00:00
Jorge Gil
fa63935a61 Merge "Update PIP menu accessiblity bounds when it is moved" into sc-dev 2021-03-10 23:51:52 +00:00
Nataniel Borges
c0da8c3f13 New enter pip assertion
Rename previous assertion to "pip app always visible" and create a new one asserting that pip window becomes visible

Test: atest FlickerTests:com.android.wm.shell.flicker.pip
Bug: 167521701
Change-Id: I237c8369b58a766b60f4eb96b7dc465e86f96679
2021-03-10 15:29:14 +01:00
Nataniel Borges
41b7c17297 Generalize pip transitions and assertions
Share code and assertions between the transitions to improve maintainability

Test: atest FlickerTests:com.android.wm.shell.flicker.pip
Bug: 167521849
Change-Id: Ie24ac84e0ffcaa6ef786865b9f5d5220fea4263f
2021-03-10 14:07:31 +01:00
Nataniel Borges
8cbe35fa80 Generalize apppairs assertions
Share code and assertions between both transitions to improve maintainability

Test: atest FlickerTests:com.android.wm.flicker.apppairs
Bug: 167521849
Change-Id: I591a6eda408a169d92732f8c1497fef51b27797f
2021-03-10 14:06:35 +01:00
jorgegil@google.com
a5547def07 Update PIP menu accessiblity bounds when it is moved
Bug: 179337864
Test: atest PipHomeTest
Change-Id: I37ffbade283861f0013f29a86855146fd2c012de
2021-03-09 16:18:14 -08:00
Nataniel Borges
0e77adca1a Fix enter pip parameters
Enter pip is not a rotation test and should use the non-rotation configuration

Test: atest FlickerTests:com.android.wm.shell.flicker.pip.EnterPipTest
Bug: 167521701
Change-Id: I0df35bdc08e7ac9c07bdf7f55398004076966410
2021-03-08 16:10:46 +01:00
Nataniel Borges
d85b2e28c7 Log WM trace on frame instead of transaction
Logging all transactions of WM lead to logging inconsistent states that are not sent to SF nor visible to the end user. This information increases the flakiness of the test.

Logging only on frame means that the log will only contain the information sent to SF.

Test: atest FlickerTests WMShellFlickerTests
Bug: 167521849
Change-Id: I16624181ebd127482724439fff84d4bca7fe9ab3
2021-03-05 15:52:05 +01:00
Nataniel Borges
ca35310221 New CUJ: Swipe pip window to bottom center to close
Share the assertions between close with dismiss and close with swipe.

Bug: 172037252
Test: atest WMShellFlickerTests:PipCloseWithSwipe WMShellFlickerTests:PipCloseWithDismissButton
Change-Id: I03904f1de78d3204f9bdd0d6207ec4947f1404dd
2021-02-26 14:41:17 +01:00
Nataniel Borges
31182d2383 Merge "Promote stable app pairs tests" into sc-dev 2021-02-26 12:46:12 +00:00
Nataniel Borges
62d88aac30 Merge "Promote stable Pip tests" into sc-dev 2021-02-26 12:46:08 +00:00