Commit Graph

216 Commits

Author SHA1 Message Date
vadimt
8914c51660 Workaround for activity manager crashing when trying to start an app
It flakes when one of the tests starts calculator while there zero
activities in the system.

Bug: 143488140
Change-Id: Id9d350f0de8a83eb50e35e9efa4226b8d45ca641
2020-06-20 01:12:50 +00:00
vadimt
d8e5660b13 Fixing broken tests on 2 and 3 button devices.
Bug: 143488140
Change-Id: I30886da129825b800984baa08742ac4dfcf4a599
2020-06-17 10:19:51 -07:00
TreeHugger Robot
9354de6c91 Merge "Attempt to workaround a leak on Taimen" into ub-launcher3-rvc-dev 2020-06-16 20:58:39 +00:00
vadimt
6a3de331af Attempt to workaround a leak on Taimen
It's a flake.
It was likely caused by enabling fallback tests, and we don't know
what's leaked and why.

Bug: 143488140
Change-Id: I0d0c88ac9b0de316861f16ba023a596c1f39cde4
2020-06-16 20:21:49 +00:00
vadimt
f6a179d3ae Remove a comment that a line of code is a workaround
Bug: 157099707
Change-Id: I417df10735438caf6fd7fd5833817b5c43a1e856
2020-06-15 10:19:15 -07:00
vadimt
01bb8125b0 Enable FallbackRecentsTest
With some temporary workarounds.

Bug: 143488140

Change-Id: Id1ed2d06fd3265a6aa7f98d2900733f580359944
2020-06-12 15:12:37 -07:00
vadimt
454de304d0 Workaround for an activity leak
We were told that showing NexusLauncherActivity should suppress the
leak.

Bug: 157099707
Change-Id: I9988ac4a20609e5b25ddc4a90bedf891d45e69da
2020-06-08 15:16:15 -07:00
Sunny Goyal
b396864072 Fixing loadTasksInBackground called twice on swipe up
Bug: 157644889
Change-Id: Ia4413ea878f8ba731fbb7a8f61b7c0c0050f3811
2020-06-01 15:12:32 -07:00
Vinit Nayak
b9522d334a Infer launcher rotation when initializing RecentsOrientedState
fixes: 154776599
Change-Id: I9b95f7f96836a974be0fd1236547efb4b405fda5
2020-05-11 11:23:49 -07:00
TreeHugger Robot
d73d39b45a Merge "Makeshift analog of Strictmode leak detector" into ub-launcher3-rvc-dev 2020-04-23 03:22:31 +00:00
vadimt
b3e8ae8230 Makeshift analog of Strictmode leak detector
Strictmode leak detector is still a goal, but we might not be able to
achieve it in R. Strictmode has several framework-side bugs that perhaps
hide Launcher-side strictmode violations, while the time to fix
everything is limited, and new leaks get introduced all the time.

For now, implementing a check that is slightly more relaxed than
Strictmode, but still ensures the absence of leaks. I’ll keep
eliminating Strictmode violations as well as keep strengthening the
makeshift checker conditions until we’ll be able to enable Strictmode in
continuous testing.

I’m disabling Strictmode checks for now so that they don’t generate
unnecessary hprof dumps, but leaving the code dealing with strictmode.

Bug: 139137636
Change-Id: Ib10136b0d4e9892f70a19cd052ae5a54cf0a4efb
2020-04-22 19:00:12 -07:00
Sunny Goyal
34ff8cb3c1 Adding common code for instrumentation and robolectric tests
Change-Id: Ia338f0565868bb174ef5f6721924944792866be6
2020-04-20 14:42:30 -07:00
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
vadimt
0dd1bd1113 TAPL: Verifying activity start/stop events
It also turned out that Pilfer event seems to come in a
non-deterministic order relative to the events from the Main and TIS
sequences. So I moved it to its own sequence.

Change-Id: Ie4ea5865afd900bebbd8287dad2372c94dce8ad5
2020-03-27 10:23:33 -07:00
vadimt
ccf083dc7d Using cmd overlay enable-exclusive to switch nav modes
Bug: 151598694
Change-Id: I7df6b7538f7233163868065b866b610c45dc7b46
2020-03-16 12:43:10 -07:00
Vadim Tryshev
9099dfcfb7 Merge "Test tweaks for the memory activity recreation test" into ub-launcher3-master 2020-03-06 18:36:05 +00:00
TreeHugger Robot
d26618acba Merge "Enabling testQuickSwitchFromApp after causes of flakiness were fixed" into ub-launcher3-master 2020-03-05 18:56:07 +00:00
vadimt
f6385576d5 Disabling testToast on virtual devices
Bug: 150303529
Change-Id: Ie523b79468f37e9edbd50f77db4d358e6713a463
2020-03-04 18:49:52 -08:00
vadimt
04b90c0fcb Test tweaks for the memory activity recreation test
Speeding up switching navigation mode by switching from latch
(which is not fired) to polling. I'll figure out later why the latch
doesn't work.

Bug: 139137636
Change-Id: I28a9b2b9a3882919fd2a3280b9804afe1b44a46e
2020-03-04 17:36:29 -08:00
vadimt
99f8a99463 Enabling testQuickSwitchFromApp after causes of flakiness were fixed
Bug: 143285809
Change-Id: Ie0c20bfdb04276adf349e90bf6826c89e9fbb5e3
2020-03-04 10:52:22 -08:00
Vadim Tryshev
d4fb87e265 Merge "Disabling failing test" into ub-launcher3-master 2020-03-02 21:39:58 +00:00
vadimt
c8bae0ab71 Disabling failing test
Change-Id: I5989ce406c66834b77ff4bd073cd3ad92df9fda2
2020-03-02 13:35:55 -08:00
Vadim Tryshev
d8995a6fda Merge "Revert "TAPL: Verifying activity start/stop events"" into ub-launcher3-master 2020-02-28 22:29:47 +00:00
Vadim Tryshev
3dd64ca3a8 Revert "TAPL: Verifying activity start/stop events"
This reverts commit 1186700c9a.

Reason for revert: Fails in the lab

Change-Id: I6715a058c76d96752b904331968b46a07ce93f85
2020-02-28 22:28:16 +00:00
Zak Cohen
23ceafe3d5 Merge "TAPL tests - make all apps in overview checks less fragile." into ub-launcher3-master 2020-02-28 21:21:36 +00:00
Zak Cohen
dc24231e4f TAPL tests - make all apps in overview checks less fragile.
Tests that check for all apps in overview mode were only checking for
actions being enabled. This isn't sufficient logic, two button mode also
uses all apps.

Centralize the check for all apps.

Test: local tapl tests
Change-Id: If1bf98019e6f1aea8f7967883aba6780743e9d6b
2020-02-28 11:59:33 -08:00
Vadim Tryshev
64a932ed2a Merge "TAPL: Verifying activity start/stop events" into ub-launcher3-master 2020-02-28 19:22:32 +00:00
Zak Cohen
eecb258cc7 Merge changes from topic "enable" into ub-launcher3-master
* changes:
  Overview Actions - Enable by default.
  TAPL test update - don't run all apps in overview tests with actions.
2020-02-27 19:48:51 +00:00
vadimt
1186700c9a TAPL: Verifying activity start/stop events
It also turned out that Pilfer event seems to come in a
non-deterministic order relative to the events from the Main and TIS
sequences. So I moved it to its own sequence.

Change-Id: I5851aafb6d04398c5727712eaf8561916a30c4c5
2020-02-27 11:12:35 -08:00
Zak Cohen
fe935dfbc1 TAPL test update - don't run all apps in overview tests with actions.
Overview actions removes the all apps from overview. Don't run the tests
that depend on these.
Ultimately need to add more tests for the actions.

Test: tapl local
Change-Id: I2471d10af7bc03a40a94f99aa16354b85bdb3ad7
2020-02-25 15:09:12 -08:00
vadimt
1779a38290 Using StrictMode to detect activity leaks
Change-Id: I615f641897d57be0cd31be944796c6931ef9ab00
2020-02-25 14:46:27 -08:00
vadimt
b79614cc93 Performing a check for a crashed Launcher process for each UI test 2020-02-25 02:28:32 +00:00
vadimt
3a49aa090f Enable testQuickSwitchFromApp after fixing what caused it to fail
Bug: 143285809
Change-Id: Ic7895ab7d4ef3ab207fc77184eb53f0f6d8e9b23
2020-02-13 16:14:15 -08:00
vadimt
047812a906 Remove test testPressRecentAppsLauncherAndGetOverview
It tests UiDevice.pressRecentApps(), which we don't use, so we don't
need to test it.

Bug: 131115533
Change-Id: I3a1b31f3b8368e3c848c888a5a27577faa940832
2020-02-11 19:15:59 -08:00
vadimt
c71db98747 Increasing nav mode settlement timeout as an attempt to workaround nav
mode mismatch bug.

Bug: 148422894
Change-Id: I1295c1415a308ec461d302c9973309f4de77f984
2020-02-07 10:34:59 -08:00
Winson Chung
85cd51e0e2 Merge "Remove workaround for starting app" into ub-launcher3-master 2020-02-04 21:43:49 +00:00
Winson Chung
dd14633250 Remove workaround for starting app
Bug: 141580748
Change-Id: I7760bc0ee07db6798153ff33566b48fcb3c39651
2020-02-04 19:06:55 +00:00
vadimt
3908a50ce1 Disable testQuickSwitchFromApp test due to test failures
Bug: 143285809
Bug: 148865178
Change-Id: I9ac955d9b1ea057258b65b65c5bc813441c1161f
2020-02-04 18:42:56 +00:00
vadimt
db185f6b3e Enabling quick switch test
Now that 2 underlying bugs are fixed

Bug: 143285809
Change-Id: Ie85177830def6e6ee72688f7dbb15ebef9c5ae48
2020-01-31 17:27:46 -08:00
TreeHugger Robot
ed6aa18992 Merge "Making setActiveOverlay and getCurrentOverlayPackage public" into ub-launcher3-master 2020-01-30 23:39:45 +00:00
vadimt
4809121c02 Making setActiveOverlay and getCurrentOverlayPackage public
These will be used by memory tests

Bug: 139137636
Change-Id: I213966e8a0443b122412a4fd9fc6415870db2c05
2020-01-30 02:39:26 +00:00
TreeHugger Robot
0618d689e8 Merge changes from topic "state-supplier" into ub-launcher3-master
* changes:
  Translate recents slightly while dragging after pausing
  Two-zone model: swipe up from nav bar vs above it
  Change LauncherState to Supplier<LauncherState> in tests
2020-01-29 03:06:04 +00:00
Tony Wickham
8a054061ef Change LauncherState to Supplier<LauncherState> in tests
This prevents the test from statically initializing LauncherState and
all its static dependencies, which might lead to runtime exceptions in
out-of-proc tests.

Change-Id: I0e4e09dfb31a8b256c2c0c0b3d1d2ecd0cc92230
2020-01-28 18:07:33 -08:00
vadimt
fcaab044a3 Avoid confusing errors "Launcher pid should be 0" when test setup fails
Change-Id: Ic5e8114a0f86d1a08738785c4098645e59a24975
2020-01-24 14:30:40 -08:00
Vadim Tryshev
8cf7b03cad Merge "Adding auto-investigation of one more flake" into ub-launcher3-master 2020-01-23 20:17:33 +00:00
vadimt
29d8b54957 Disabling events checks for successful gestures by default
Launcher tests will still perform checks upon every gesture completion.

All tests using tapl will still use events for diagnostics if the
gesture fails.

The benefit is that system health and other platform tests won't have to
use expensive logcat, and moreover, wait seconds for the events to
appear in logcat because of buffering in logcat.

Change-Id: I3b5a0965d9432144d0c4a8b40ebe2fa89b19a689
2020-01-22 19:16:32 -08:00
vadimt
2c6316be46 Adding auto-investigation of one more flake
Reshuffling the tests to make the investigator the outmost rule and run
the code that throws the original exception inside the investigator.

Change-Id: I714717a9b616862db5ce59116138ba7ea6ceb971
2020-01-21 19:06:59 -08:00
vadimt
d8827bad12 Verifying that Launcher didn't crash in TaplTestsQuickstep
TaplTestsLauncher3 already do this

Change-Id: I17fe638b81cbef4cf5230a6bd49b165e4f9e7855
2020-01-16 17:28:43 -08:00
vadimt
252d012ed0 TAPL: Verifying some interactions with system
Investigation of TAPL failures, especially flakes is complex, partially
because it’s hard to tell whether it’s Launcher who is wrong or the
system.

We need to introduce a framework that looks at Launcher interaction with
the system and reports when interactions deviate from the expected
course, and who made the first wrong step.

This is first, proof-of-concept CL.

It analyzes long-press events. We had multiple cases when long-presses
didn’t happen or happened unexpectedly.

Launcher registers the events, TAPL retrieves and compares against the
sequence of expected regular expressions. This diagnostic is used when
something fails and at the end of public methods.

Change-Id: I07aa3a027267c03422c99c73ccd8808445c55fe8
2020-01-15 13:31:18 -08:00
vadimt
2eb48498b4 Improving navigation mode switch rule and around
Logging assertion failures.
Modifying waits for condition to avoid timing out the whole test if the
iteration takes too long in favor of failing with an actionable diag.

Bug: 145985438
Change-Id: Ie32d93e1548ce6ec64c38449eb1be1287ff9cf56
2019-12-12 15:10:52 -08:00