Commit Graph

112 Commits

Author SHA1 Message Date
Vadim Tryshev
0e0b176361 Merge "Not showing "mismatched events" and other diags after Launcher crashes" into ub-launcher3-master 2020-02-27 19:45:39 +00:00
vadimt
da12b805cc Not showing "mismatched events" and other diags after Launcher crashes
Change-Id: Iee5f8813c3610314d486589bc361466a05da0ecb
2020-02-26 12:19:32 -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
TreeHugger Robot
ae5e991f5e Merge "Not crashing tests when a test fails to deinitialize" into ub-launcher3-master 2020-01-29 21:46:27 +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
053cb7a6e6 Not crashing tests when a test fails to deinitialize
This causes nondescript diags "Test failed to run to completion.
Reason: 'Instrumentation run failed due to 'Process crashed.''. Check
device logcat for details"

Now quietly skipping all consequent tests after such failure.

Change-Id: I3747cda1a3094bfe82e27eae39ba9e9dfd4af9b6
2020-01-27 19:26:00 -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
TreeHugger Robot
c9a907bec1 Merge "Removing temporary workarounds to make tests pass on Cuttlefish" into ub-launcher3-master 2019-12-16 22:37:09 +00:00
vadimt
08eca2fa2e Removing temporary workarounds to make tests pass on Cuttlefish
Bug: 136278866
Change-Id: Ie537a578bb871921c0cbea1f197261e703de98f5
2019-12-12 18:15:48 -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
vadimt
f9e559275d Making the default launcher rule outer for the Portrait-Landscape one
Portrait-Landscape uses Launcher activity and needs it to be set up
correctly.

Change-Id: I13c9712647b3e45a259039d7968bb95cfe8158ef
2019-11-19 13:36:29 -08:00
vadimt
137f5b62ac Improve diags when system errors cause failing Launcher tests
Now, for example, we won't diagnose a locked phone as a
"home button not showing in 3-button mode", even though it's technically
correct.

Change-Id: Ibdfa0741af7ff8545a811f6702dda74dc6c31c2e
2019-11-04 14:50:22 -08:00
Tony Wickham
bc42d64c85 Fix testQuickSwitchFromApp
Instead of starting getAppPackageName() and relying on it being our Test
Pin Item activity, instead launch our own test activities with the
FLAG_ACTIVITY_MULTIPLE_TASK and FLAG_ACTIVITY_NEW_DOCUMENT flags.

Test:
- Locally run testQuickSwitchFromApp() from Android Studio
- flake -oop -t com.android.quickstep.TaplTestsQuickstep#testQuickSwitchFromApp

Bug: 140252765
Change-Id: Ie137261ce65bfd3dd39df78d57784854a026e967
2019-10-23 23:42:19 +00:00
TreeHugger Robot
f31dab5e02 Merge "Removing static instance of LauncherAppsCompat and unnecessary wrapper classes" into ub-launcher3-master 2019-10-08 18:49:36 +00:00
Sunny Goyal
e7b00128c7 Removing static instance of LauncherAppsCompat and unnecessary wrapper classes
Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-10-02 16:20:22 -07:00
Sunny Goyal
b0adac23e0 Removing access to LauncherModel.getCallbacks
Bug: 137568159
Change-Id: Ic074dec6a8981a4b9aabf028cf3b878b532abb11
2019-10-02 14:27:40 -07:00
Vadim Tryshev
67138875fa Merge "Not unlocking phone on the test start" into ub-launcher3-qt-qpr1-dev am: 872a380b59
am: 4c420047cf

Change-Id: I23f87d541771baa7ba3e5857999a5e5c96c301ce
2019-09-30 14:01:37 -07:00
Vadim Tryshev
4c420047cf Merge "Not unlocking phone on the test start" into ub-launcher3-qt-qpr1-dev
am: 872a380b59

Change-Id: I6e0831a2660459803eef6c755e4fcfc9f414c94f
2019-09-30 13:54:36 -07:00
vadimt
ee3db65ecc Not unlocking phone on the test start
Somehow tests unlock the phone anyways.

Bug: 141772190
Change-Id: I66de70ec10a7e9ae05ba942570bf9eff9d9e7a82
2019-09-30 12:48:47 -07:00
Vadim Tryshev
6254e5e246 Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev am: dd079691c1
am: 1430f132f3

Change-Id: If494e30957893c4e3414ebdbd274601d16a66a98
2019-09-27 13:28:18 -07:00
Vadim Tryshev
1430f132f3 Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev
am: dd079691c1

Change-Id: I7419be6416f26274bf03abfd84eedef20fd6f084
2019-09-27 13:21:46 -07:00
vadimt
2611d79f69 Deprecating LauncherInstrumentation constructor with parameter
Change-Id: I779b4a8fde2db73cced8133f12d1356ad0b8729e
2019-09-27 12:00:09 -07:00
Vadim Tryshev
52b1ff2050 Merge "Not using dropbox entries before the test start for diagnostics" into ub-launcher3-qt-qpr1-dev
am: dcb5412e1c

Change-Id: I70b2434f162f6575a88bcc0b43bdf8cce1cbc359
2019-09-20 19:48:40 -07:00
vadimt
3bdba61542 Not using dropbox entries before the test start for diagnostics
Change-Id: Ieb48d969d86a855c91109f4ace0d636fa01aafc7
Merged-in: Ia060b5d2b98ea9ea3b6e61ae11d610f1a888d7a0
2019-09-21 01:37:56 +00:00
vadimt
6a585df8d1 Not using dropbox entries before the test start for diagnostics
Change-Id: Ia060b5d2b98ea9ea3b6e61ae11d610f1a888d7a0
2019-09-20 18:12:05 -07:00
Sunny Goyal
8f90d5da8a Adding test to check view inflation during swipe up
Bug: 137851409
Change-Id: Ic8e6f0b3c667051b921d1d4fad03c94122ee92e9
2019-09-20 15:36:02 -07:00
Vadim Tryshev
493ea23bfd Merge "Experimenting with detecting whether a test runs in presubmit" into ub-launcher3-qt-qpr1-dev
am: 37cc797fd0

Change-Id: I0ab81659ea9aaf6b75cd1106bbbaf9c75c679a41
2019-09-18 19:33:40 -07:00
vadimt
fead086f2d Experimenting with detecting whether a test runs in presubmit
Change-Id: I386c6ad29182170326c557252fe6e20a8d2af34a
Merged-in: I386c6ad29182170326c557252fe6e20a8d2af34a
2019-09-19 01:18:46 +00:00
vadimt
6d88752eeb Experimenting with detecting whether a test runs in presubmit
Change-Id: I386c6ad29182170326c557252fe6e20a8d2af34a
2019-09-19 00:59:32 +00:00
Sunny Goyal
ed83cf6df0 Adding recents test for 3P Launcher
Bug: 140749967
Change-Id: I3644822accfd229d1e46ca5e43ad827aef776787
2019-09-17 13:41:10 -07:00
TreeHugger Robot
f3fd35d5f2 Merge "Adding flickerlib test" into ub-launcher3-master 2019-09-11 20:33:01 +00:00
Vadim Tryshev
c698c0cdbb Merge "Adding a test method to get a Launcher object when it becomes non-null" into ub-launcher3-qt-qpr1-dev
am: b34f951e7e

Change-Id: Id63a1df1aef2f35b0f6cdb0f8ab851163c8140c9
2019-09-09 14:17:20 -07:00
vadimt
84fa5893e7 Enabling some tests in landscape mode
am: 8c2efd0de0

Change-Id: If74fe6cec774787f73f43aae43863cd71887b81f
2019-09-09 14:17:08 -07:00
Winson Chung
11ae8642dc Adding flickerlib test
Bug: 140244969
Change-Id: I45edfbbfb85fa371435ad0940cd939ed3d28c374
2019-09-05 17:14:09 -07:00
Vadim Tryshev
b34f951e7e Merge "Adding a test method to get a Launcher object when it becomes non-null" into ub-launcher3-qt-qpr1-dev 2019-09-05 18:49:10 +00:00
vadimt
cf61e16a2c Adding a test method to get a Launcher object when it becomes non-null
Change-Id: I1c56777c87827b5edf1c7f55ad9639321e598311
2019-09-04 19:02:54 -07:00
vadimt
8c2efd0de0 Enabling some tests in landscape mode
Bug: 121280703
Change-Id: I285638d832594d5fed26ee812737a4356b110899
2019-09-04 17:33:52 -07:00
Vadim Tryshev
72fddba837 Merge "Enabling debug tracing for all UI tests" into ub-launcher3-qt-qpr1-dev
am: 846656f138

Change-Id: Ie40cc1d55d40ffefe6c1b2d3588b03ff92d2cb38
2019-09-04 12:37:40 -07:00
vadimt
0ce38af957 Enabling debug tracing for all UI tests
Change-Id: I434ee378baf35de955c8a589b8380e1751e4107a
2019-09-03 17:16:34 -07:00
Sunny Goyal
6fe3eec95c Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
2019-08-20 14:36:17 -07:00
vadimt
a8726dc93b Tests: Use FLAG_ACTIVITY_CLEAR_TASK
Change-Id: I58053db6f942737976afcaed26e449a1f9b98f6f
2019-07-31 10:45:57 -07:00
vadimt
0dd1c782f0 Checking Launcher internal integrity from tests
In particular, we check that the stable Launcher state equals its
current state. This can help detect Launcher being in a corrupted state
as in b/133867119.

The check gets called by tests when the Launcher is not transitioning
from state to state.

Bug: 137307838
Change-Id: I3d36edff35e42d14be6b9a52351bd6f709be75e8
2019-07-23 18:07:25 -07:00
vadimt
092b6f8cbf Adding system health diags for inporoc tests
Bug: 133891845
Change-Id: I90161bfc9db5983a45dfb89728a82ec1e3d81f19
2019-07-15 12:29:13 -07:00
vadimt
e7a786ee96 Tests: Waiting for package-restart events when restarting Launcher
Bug: 136215685
Change-Id: Ia947994399220544c90bfc077437fc639e635a33
2019-06-28 17:14:37 -07:00
vadimt
83d5eef5a5 Temporary workarounds to make tests pass on a virtual device
Bug: 136278866
Change-Id: I198cb4cdf94c2b1151b4b7249ae10dbcaa99a4fd
2019-06-28 13:12:58 -07:00
vadimt
0b20a11d66 Converting even more tests to TAPL
Bug: 131116002
Bug: 115582915
Change-Id: Id36fca232b5aff5f6692142ce4a0c937d0531f4e
2019-06-27 18:38:09 +00:00
Vadim Tryshev
007e7e94b3 Revert "Converting even more tests to TAPL"
This reverts commit 406d49bdd7.

Reason for revert: Breaks tests on Crosshatch

Change-Id: I95ff541dfe8f6f1d7e1913d209b53abfbebe5336
2019-06-27 00:03:14 +00:00