Commit Graph

179 Commits

Author SHA1 Message Date
Nataniel Borges
da5136ea43 Provides assertion blocks on Flicker
Enable tests ot be in presubmit, postsubmit or marked as flaky

Do not require flicker DSL changes

Bug: 162923992
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I74fdadaf5f6f08d96973683682297200eec6658d
2021-02-02 18:16:12 +01:00
Bill Lin
6ea20e07d8 1/ Integrate legacySplitScreen Flicker tests into individual assertions
1) Integrate companion object inheritance and the default test runner
2) Move launch activity to setup: avoid noise of splash screen
3) Move setRotate() to setup: avoid noise of system windows
   (LetterBox, NavBar, StatusBar...) visibility changes
4) Reducing test time of each test case: remove redundant transition
5) Remve redundant val for readibility
6) Remove navBarLayerIsAlwaysVisible assertion from split test
   the rotation flow of enter split screen :
   Overview(land) -> enter split(portrait) -> split mode(land)
7) Partially enable ROTATION_90 tests
8) Bypass visibleLayersShownMoreThanOneConsecutiveEntry assertion
   for flaky reasons(Splash Screen, LetterBox, BackGestureSurface)

Test: atest WMShellFlickerTests
Bug: 176134495
Bug: 178685668
Bug: 178447631
Change-Id: I1d6153b987e5913a5d9a1fa5b72b9341b40db6fc
2021-02-02 10:41:45 +08:00
Nataniel Borges
cf2a6fa2bf Remove flicker tests from postsubmit with TEST_MAPPING
The postsubmit tests run using ATP instead.

Bug: 162923992
Test: check the flicker tests dashboard
Change-Id: I5a408a4d241125d97701a59a3852ca894bcf4cc4
2021-02-01 17:54:11 +01:00
Nataniel Borges
1ee38b1c18 Reduce flicker memory consumption (Pt 4)
Improve flicker memory consumption with the following:
- Use a static factory for better compatibility with JUnit4 ParameterizedRunner
- Ensure `cleanUp` is always called, even when an exception occurs

Bug: 178572522
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Id9e539c0e8bce350f94811cab58a726e47aac525
2021-02-01 09:38:12 +01:00
Nataniel Borges
be648ee97f Disable visibleLayersShowInConsecutiveEntries assertion on IME
This assertion is ~30% flaky at the moment

Bug: 162923992
Test: atest FlickerTests
Change-Id: I4abe2869a83ee6de910bd78f41ea0bbe802908f1
(cherry picked from commit 8982df5d9a)
2021-01-29 08:08:25 +00:00
TreeHugger Robot
c64d83723f Merge "Disable visibleLayersShowInConsecutiveEntries assertion" 2021-01-26 14:31:26 +00:00
Nataniel Borges
beaddd2cde Disable visibleLayersShowInConsecutiveEntries assertion
This assertion is ~30% flaky at the moment

Bug: 162923992
Test: atest FlickerTests
Change-Id: I288b5f19ee45bd708a4c47b161f6b7f5405968b5
2021-01-26 08:45:06 +01:00
Nataniel Borges
44765a6ad2 Merge "Enable close app (with back or home) tests" 2021-01-25 19:53:25 +00:00
Nataniel Borges
f69a29928d Merge "Enable reopen IME from overview tests" 2021-01-25 19:53:21 +00:00
Nataniel Borges
7974a23ffb Enable reopen IME from overview tests
The tests are stable in postsubmit, so they can be moved to presubmit

Bug: 175027130
Test: atest FlickerTests
Change-Id: Ic2e084d92ec2d1db6f87126493440b3be3efd6ba
2021-01-25 18:31:30 +01:00
Nataniel Borges
0d91cfff91 Enable reopen app from overview tests
The tests are stable in postsubmit, so they can be moved to presubmit

Bug: 174658929
Test: atest FlickerTests
Change-Id: Id912152ecc693ed267a10d2d9e8fffa333f6792c
2021-01-25 18:29:35 +01:00
Nataniel Borges
8989a88084 Enable close app (with back or home) tests
The tests are stable in postsubmit, so they can be moved to presubmit

Bug: 174635878
Test: atest FlickerTests
Change-Id: I5775f1ab4962fb3ffea3cff6db7cce8c0ec0c28d
2021-01-25 18:28:01 +01:00
Nataniel Borges
1257711e65 Merge changes from topics "media-projection", "merge-specs", "single-assertion"
* changes:
  Use MediaProjection for screen recording
  Split app pair tests into individual assertions
  Compatibilize tests with new runner
2021-01-25 14:06:18 +00:00
Nataniel Borges
9d110213e9 Use MediaProjection for screen recording
Use media projection instead of the shell command for screen recording.

Test: atest FlickerTests
Bug: 177077842
Change-Id: I9ac7351bf04004b5512316232637fd5cc2dd5fcc
2021-01-25 08:58:32 +01:00
Nataniel Borges
143d584efd Compatibilize tests with new runner
Runner now prints each assertion individually to aid debugging.

Bug: 162923992
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I1c9a49ec3c283e5e034f0223573fca3ccafaf64c
2021-01-25 08:58:21 +01:00
Vishnu Nair
83b4e33b0f Mark Flicker IME tests as flaky
Based on https://android-build.googleplex.com/builds/tests/view?invocationId=I03300007196042648&testResultId=TR66816781903620616

Bug: 178015460

Change-Id: I14768f985de5c94b9b2e4ac6283d708c8cedd555
2021-01-20 14:12:18 -08:00
Nataniel Borges
07f68e36fd Expect IME to use whole screen on landscape
On flame the IME is using the whole UI and the test app is not visible, when the phone is in landscape mode.

Make the flicker tests compatible with this change.

Bug: 176799414
Test: atest FlickerTests
Change-Id: I52f18e4b6c1dc48758b833fbf4e11e80853effc2
2021-01-07 12:12:36 +01:00
Nataniel Borges
e367ff476c Consider rounded corners in occluded by (tests)
The visible region calculation in the surface flinger doesn't consider that a layer with rounded corners can fully occlude another. Use the same behavior in flicker and winscope.

Bug: 174541970
Test: atest FlickerTests
Change-Id: Ia18f49495d911e17c6493eb5344beb02a4a190e7
2021-01-05 17:13:46 +01:00
Antonella Dellanzo
ab508e96cf Updating split screen tests
Updating split screen tests:
- Adding the assertions visibleWindowsShownMoreThanOneConsecutiveEntry and visibleLayersShownMoreThanOneConsecutiveEntry for all the split screen tests (the layer one is disabled as we need ag/13051160 to ignore one layer).
- Replacing some assertions for other that check more things (i.e. replacing the dockedStackDividerIsVisible assertion for dockedStackDividerBecomesVisible).
- Adding some new assertions to the current tests in order to check for more things.

Adding new WM and layer assertions to Flicker tests to avoid repeating code:
- appWindowBecomesVisible
- layerBecomesVisible
- layerBecomesInvisible

Adding new layer assertions to WM shell to avoid repeating code:
- dockedStackDividerBecomesVisible
- dockedStackDividerBecomesInvisible

Test: atest WMShellFlickerTests
Bug: b/171049797
Change-Id: I2bbb23a1cf92df16ee6292e5da4644936a6d99e5
2020-12-17 22:13:26 +01:00
Antonella Dellanzo
8635302f05 Adding assertions to ReOpenImeWindowTest
Updating ReOpenImeWindowTest & OpenAppFromOverviewTest transition to wait for fullscreen app instead of hasWindow as this last one was not completely correct.

Adding the assertions for the test ReOpenImeWindowTest.
Adding also some missing assertions to OpenImeWindowTest.

Moving some tests from CommonAssertions launch file to flicker common assertions so that other tests, besides the lunch ones, can use them:
- wallpaperWindowBecomesInvisible
- appLayerReplacesWallpaperLayer

Adding new IME assertions:
- imeWindowBecomesVisible
- imeAppWindowBecomesVisible

Renaming assertion windowAlwaysVisible to appWindowAlwaysVisibleOnTop to be more clear on what it does.

Test: atest FlickerTests
Bug: b/175197807
Change-Id: I157962d53f1254a04c9abef7c6ad2bd1392b1728
2020-12-16 11:39:55 +01:00
Vadim Caen
5f092e38a6 Merge "Adding Natanieljr@ to flicker owners" am: 51fa9312f4 am: 36a33d2e04 am: 1d746f6ece
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1518586

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I589c75fe2032fb010e2df53fcf2c30a7341fb6b4
2020-12-11 12:40:47 +00:00
Antonella Dellanzo
b1e55c28cb Updating IME tests
Updating all IME tests with new assertions (visibleLayersShownMoreThanOneConsecutiveTime and visibleWindowsShownMoreThanOneConsecutiveEntry). For the visibleWindowsShownMoreThanOneConsecutiveEntry, adding a new param to it to ignore some windows as the InputMethod window should be ignored as it only shows one time. Same behaviour for visibleLayersShownMoreThanOneConsecutiveEntry.
Also enabling some assertions that were disabled that seems to work.

Test: atest FlickerTests
Bug: b/171049649
Change-Id: I15a6e4934dfc64fd9449d4ff15ce7b1ab881f324
2020-12-10 13:18:29 +01:00
Vadim Caen
9e9ff33963 Adding Natanieljr@ to flicker owners
Change-Id: If0339feee4aca5ee30efa582e9751f9023c00eee
2020-12-09 11:02:20 +00:00
Jeff Sharkey
0ab7007631 resolve merge conflicts of 358f0d4fc8 to master
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
2020-12-08 11:01:05 -07:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script that
identifies relevant "include" directives.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-12-08 08:36:28 -07:00
Antonella Dellanzo
22038dc533 Disabling ReOpenImeWindowTest
Disabling the test ReOpenImeWindowTest as it's crashing the tests on crosshatch and making all postsubmit tests fail.

Test: atest FlickerTests
Bug: b/175027130
Change-Id: I4ff2e059a4afeef1ba74cfbccb4173dd72fca84b
2020-12-07 20:11:45 +00:00
TreeHugger Robot
0195349c81 Merge "Repeat app rotation test multiple times" 2020-12-04 01:59:11 +00:00
Nataniel Borges
cf338510ef Repeat app rotation test multiple times
To detect flickers the test should execute multiple times the transition instead of a single one.

Bug: 173688145
Test: atest FlickerTests:ChangeAppRotationTest
Change-Id: I5d28750e2a667c19c0f9263bda8566c6fd818e39
2020-12-03 15:11:03 +01:00
Nataniel Borges
bd633232d3 Add name to focusChange assertions
This name is shown in the list of executed tests

Test: atest FlickerTests
Change-Id: I78bcc4d112f3cc1ee0a9f116537fb32c17e44493
2020-12-03 15:10:19 +01:00
Antonella Dellanzo
bdb98a18aa Merge "Disabling OpenAppFromOverviewTest" 2020-12-03 10:32:27 +00:00
Antonella Dellanzo
1f328f2688 Disabling OpenAppFromOverviewTest
Adding the FlakyTest annotation to the test OpenAppFromOverviewTest as it's crashing on crosshatch.

Test: atest FlickerTests
Bug: b/174658929
Change-Id: I72d689acae51a02c6e6d03e0b7dc4636b9c3d891
2020-12-02 17:00:48 +00:00
Nataniel Borges
d43036b08c Store and pull files from /sdcard/
Tradefed FilePullerLogCollector can no longer access the internal app directory (e.g. /storage/emulated/0/Android/data/com.android.server.wm.flicker/files).

This makes it unable to pull trace files, when a test fails. This CL makes flicker tests store their data on /sdcard/flicker which can be accessed by the Tradefed FilePullerLogCollector

Bug: 171026227
Test: atest FlickerTests
Change-Id: Ibed6b621b068b0668d93b39838c0959441527295
2020-12-02 17:15:11 +01:00
Antonella Dellanzo
94241f55f2 Ignoring close tests
Marking the two close tests (CloseAppHomeButtonTest and CloseAppBackButtonTest) as flaky as they are crashing when running, and they are blocking post submit runs.

Test: atest FlickerTests
Bug: b/174635878
Change-Id: Ia63d255b60fc48bd7b05d372868ab27b1d0cbef1
2020-12-02 10:14:16 +01:00
Antonella Dellanzo
07a51d3844 Disabling flaky assertion in OpenAppColdTest
The test OpenAppColdTest has been flaky for the past weeks. The assertion visibleLayersShownMoreThanOneConsecutiveEntry is the one we are disabling because of bug b/174541970.

Test: atest FlickerTests
Bug: b/174541970
Change-Id: I4403704c9440283fab44725dc3a445ea16eca138
2020-12-01 10:34:13 +01:00
Jorim Jaggi
4b59cf44df Merge "Revert "Add presubmit tag in close test"" 2020-11-26 15:57:53 +00:00
Jason Macnak
b31224be3d Revert "Add presubmit tag in close test"
This reverts commit 2195e8b951.

Reason for revert: Potential culprit for Bug 174223861 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Bug: b/174223861
Change-Id: I7b7c53c1fccc05efe2424daafc54cfc18cc754bd
2020-11-26 00:25:36 +00:00
Antonella Dellanzo
3bca2d1d9f Merge "Add presubmit tag in close test" 2020-11-25 08:06:04 +00:00
Antonella Dellanzo
941c3b8ac3 Move tests from FlickerTests to WMShell
Moving all tests of Pip and SplitScreen from FlickerTests lib to WMShell.

Test: atest WMShellFlickerTests FlickerTests
Change-Id: I5e915f38beb8c1fef44cf18d955caf1e3cc77b30
2020-11-23 15:54:09 +01:00
Antonella Dellanzo
2195e8b951 Add presubmit tag in close test
Adding the Presubmit tag to the CloseAppBackButtonTest and the CloseAppHomeButtonTest so that it runs on presubmit.

Test: atest CloseAppBackButtonTest CloseAppHomeButtonTest
Change-Id: Iae797b11719793e00b6cc299da18e2a68aa052bc
2020-11-23 11:10:26 +01:00
Bill Lin
a6c32cc9af 4-2/ Enhance AbstractStandardAppHelper.exit() to exit PIP at end
Integrate forceStop() in exit() that PIP window could really
exit after each round of test

Bug: 173567664
Test: atest com.android.wm.shell.flicker
Test: atest com.android.server.wm.flicker.Flicker

Change-Id: I8aaa4f590344f8fb1e6e731ed865f21f63892bb2
2020-11-19 23:11:28 +08:00
Antonella Dellanzo
2f5313a71d Merge "Add test transition to reopen ime window app" 2020-11-16 13:32:33 +00:00
Antonella Dellanzo
76ed5ef0be Add test transition to reopen ime window app
Add a new test (only the transition at the moment) that reopens an IME app with focused IME from recents apps and it will check (once we add the assertions) that the IME is still showing.

Test: atest FlickerTests:ReOpenImeWindowTest
Bug: b/171049722
Change-Id: I43f89bb26b6abcaba4b984b0955034bdf41b2977
2020-11-13 15:29:14 +00:00
Antonella Dellanzo
4248780bc6 Add assertions to CloseAppHomeButtonTest
Adding all the assertions for the CloseAppHomeButtonTest. This includes WM assertions (the common ones for all test + one that the launcher replaces the app window and another that the wallpaper window becomes visible) and layers assertions (the common ones + one for the wallpaper layer replacing the app layer).

Test: atest FlickerTests:CloseAppHomeButtonTest
Bug: b/171049778
Change-Id: I179a39914c71049002c987f5543dfa26ea6225f3
2020-11-13 14:32:21 +01:00
Antonella Dellanzo
4503f978aa Updating SeamlessAppRotation test
Updating the SeamlessAppRotationTest WM and layer assertions (adding new
ones).

Test: atest FlickerTests:SeamlessAppRotationTest
Bug: b/171049719
Change-Id: I7c6f88088ad1c357f163ffb0126cdc921217ccb3
2020-11-12 17:24:02 +00:00
Antonella Dellanzo
cc19e69c3a Merge "Add assertions to CloseAppBackButtonTest" 2020-11-12 17:15:53 +00:00
Antonella Dellanzo
c47e6a390a Merge "Add test transition CloseAppHomeButtonTest" 2020-11-12 17:15:05 +00:00
Antonella Dellanzo
042fac5bdf Add assertions to CloseAppBackButtonTest
Adding all the assertions for the CloseAppBackButtonTest. This includes WM assertions (the common ones for all test + one that the launcher replaces the app window and another that the wallpaper window becomes visible) and layers assertions (the common ones + one for the wallpaper layer replacing the app layer).
Also adding new assertions in CommonAssertions files (wallpaperLayerReplacesAppLayer, wallpaperWindowBecomesVisible and launcherReplacesAppWindowAsTopWindow).

Test: atest FlickerTests:CloseAppBackButtonTest
Bug: b/171049647
Change-Id: I992edfe372b677d723dda09a0af8fdf9f6213c73
2020-11-12 10:16:19 +01:00
Antonella Dellanzo
442c2a3df5 Add test transition CloseAppHomeButtonTest
Add a new test CloseAppHomeButtonTest that closes an app by pressing the back button (adding only the transition for now).

Test: atest FlickerTests:CloseAppHomeButtonTest
Bug: b/171049647
Change-Id: I4e234da55dfb893cb4581ba0eed9966f10763414
2020-11-11 12:45:43 +01:00
Antonella Dellanzo
c528557314 Merge "Update ChangeAppRotation test" 2020-11-06 15:50:01 +00:00
Antonella Dellanzo
5c451faad4 Merge "Add assertion for OpenAppFromOverview test" 2020-11-06 13:41:44 +00:00