Commit Graph

214 Commits

Author SHA1 Message Date
Vadim Tryshev
cc38b095d9 Merge "Disabling some tests in OOP mode" into ub-launcher3-master 2019-02-15 22:04:52 +00:00
vadimt
270ddb93d9 Disabling some tests in OOP mode
These tests call sendPointer() which fails with
"Injecting to another application requires INJECT_EVENTS permission".

Will re-add them later.

Test: running those in OOP and in-proc
Change-Id: I1c96fad14cf8bef896209a94065614a6207ea751
2019-02-15 13:37:48 -08:00
vadimt
e12f5c3b8b Unifying setup for AOSP and Nexus Tapl Tests
Test: TaplTestsQS
Change-Id: Ib699566f13980bd89335ad17b2a694e37b83e2ae
2019-02-15 12:08:19 -08:00
vadimt
2f2994cd37 Reducing tests flakiness.
Moving some tests to TaplTests. It's a right idea in general, also
flakes seem to go away because of a different initialization pattern.

Reintroducing UIDevice.pressHome in the test's start. Once BVTs pass,
I'll switch back.
See b/121335479

Test: All nexus tests
Change-Id: I677be5b6aaf073d15e8f2cf9b7a940a1f457b325
2019-02-14 15:10:52 -08:00
vadimt
01e8871b54 Support for a test for pausing an app via Overview.
Bug: 117888000
Change-Id: If9fc76ddfbc756acf39ad5209904d3099c2e4e5f
Tests: on the Nexus side
2019-01-30 11:39:56 -08:00
TreeHugger Robot
3663b314fa Merge "Removing diagnostics" into ub-launcher3-master 2019-01-30 18:43:08 +00:00
TreeHugger Robot
bc7011a5d2 Merge "Fixing AOSP TaplTestsLauncher3.testAllAppsFromHome test" into ub-launcher3-master 2019-01-30 18:41:58 +00:00
vadimt
44d227a5b8 Fixing AOSP TaplTestsLauncher3.testAllAppsFromHome test
On the AOSP target, there are not enough apps to make App Apps
scrollable. Moving the test to QS Tapl tests.

Change-Id: I95e196bafdbd0fee77705554890a7c3cda7ac92a
Tests: the affected test
2019-01-29 17:23:25 -08:00
vadimt
c5e3f9463d Not suppressing exceptions in tests.
This makes it harder to diagnose problems.

Bug: 117888000
Test: all tests affected by the change
Change-Id: I354e86af0929531653cf59ce1eb6435018c20e1a
2019-01-29 16:52:22 -08:00
TreeHugger Robot
b3ca6aee2c Merge "Changing min sdk to 25" into ub-launcher3-master 2019-01-29 20:43:01 +00:00
Sunny Goyal
8c48d8bea6 Changing min sdk to 25
Change-Id: I0d28069967854357ca755bf25dec19d4979bdecf
2019-01-29 11:29:52 -08:00
vadimt
dc2f2dc639 Splitting TaplTests into a pure AOSP and QS parts
This will allow running as many as possible automatic checks on AOSP
launcher and moving most AOSP tests that use TAPL to where they belong
to: Tapl Tests.

Bug: 110103162
Test: Running the test suites
Change-Id: I9192354e6097698d4b942c5682b79664ecc2336d
2019-01-29 10:53:34 -08:00
vadimt
3f8591f003 Removing diagnostics
Now that b/117332845 is fixed

Bug: 117332845
Change-Id: If8c137b9c7cc386dfc5b5af4b81a3efbfa33f770
Tests: None
2019-01-25 10:35:53 -08:00
TreeHugger Robot
8efd678269 Merge "Optimizing :enter - :exit pairs." into ub-launcher3-master 2019-01-18 18:56:52 +00:00
vadimt
579c8c200d Switching from mDevice.pressHome() to mLauncher.pressHome()
Using mDevice.pressHome() was a workaround for the shifted-search bug.

Change-Id: I740db2109af531c55f8ab59a42998bdc329fb72e
Tests: affected tests
2019-01-11 17:32:05 -08:00
vadimt
920cb92f80 Optimizing :enter - :exit pairs.
Doing so by not letting any events between XXX:enter and XXX:exit
events. This eliminates unnecessary permutations.

Example: 2 threads with 3 enter-exit pairs each would have produced 924
permutations before this, now only 20.

Bug: 120628042
Change-Id: Ia243d273a1d90202011679cc7520ea4c9e43918b
Tests: All tests that use race condition framework
2019-01-10 16:30:04 -08:00
vadimt
943b28464d Test swiping up from a killed launcher
Bug: 121164587
Test: StartLauncherViaGestureTests
Change-Id: I01c5bfc0aa23418bad7d44b8d9cf8b95cbe0b320
2018-12-17 18:09:07 -08:00
vadimt
00d4255272 Adding tests that would reliably reproduce shifted search.
This would guaranteed to repro b/118441555 before it was fixed.

The test doesn't use the most powerful feature of race condition
reproducer, which is enumerating all possible event sequences.

Instead, it uses explicit repro sequences, which makes the test much
faster.

Bug: 120628042
Test: The added test
Change-Id: I89a7a9964f160a8a20ba3d9dda2f248237713014
2018-12-17 14:41:20 -08:00
Sunny Goyal
c5939393a9 Bye bye workspace screens table
Removing a separate table for workspace screens. List of screens are
automatically parsed using the items in the favorites DB. Order of the
screen based on the screen id and rearranging screens is no longer
supported. In case the screens need to be rearranged, all the items
in the favorites db will need to be updated with new screen ids.

This makes backing up the DB (in the same database) easier as only
one table needs to be duplicates.

Change-Id: I8ba947a898f637d780e2f49925e78604263126e8
2018-12-10 11:43:35 -08:00
Vadim Tryshev
0d4ac57128 Add framework for reliably reproducing race conditions.
Bug: 120628042
Test: RaceConditionReproducerTest
Change-Id: Id658e2b0da6af186b76501ff16edbd135dda3c9b
2018-12-06 16:11:18 -08:00
Sunny Goyal
06a07e9748 Moving come tests to Roboelectric
> Fixing resource loading in robo tests

Change-Id: Id5b8a0e4916a2a200da7a41b03f19846834beb1f
2018-11-12 10:49:59 -08:00
Sunny Goyal
202fabfe10 Adding reusable version of IconCache and IconFactory
> Adding resource based allowing projects to control cache behavior
> Fixing missing comments from ag/5470467
> Adding support for no-immemory cache

Bug: 115891474
Change-Id: I691206805430cd93d3be78119bc249cefd79790a
2018-11-09 15:44:07 -08:00
Sunny Goyal
1a9cbd3c88 Moving BaseIconCache to icon lib
Change-Id: I4fb56dcd6231a848d152e690edaf8885efbc995a
2018-11-08 15:18:25 -08:00
Ryan Lothian
bb80025ef4 Remove duplicate test
I cloned the existing Instrumentation-based IntSetTest class
to be our first Robolectric test. Now Robolectric is working,
we can delete the Instrumentation test version.

Change-Id: I3adcfc451988a908c002b769b398348cb1782f1d
2018-11-06 10:57:17 -05:00
Vadim Tryshev
af2adc1cf3 Merge "Adding dummy app apk for tests" into ub-launcher3-master 2018-11-05 18:53:44 +00:00
TreeHugger Robot
631151cda6 Merge "Convert more tests to TAPL" into ub-launcher3-master 2018-11-05 18:42:50 +00:00
Vadim Tryshev
1b4560cf2a Adding dummy app apk for tests
Bug: 117888000
Test: In Nexus code
Change-Id: Ibf0b803c9db6b344ffbe5b7761efb2a2d86867c6
2018-11-05 10:36:21 -08:00
Vadim Tryshev
fdd1905e27 Convert more tests to TAPL
Bug: 110103162
Test: running these tests
Change-Id: I76b145eb4d16aca20ce30a5abca8f4568e3297e4
2018-11-05 10:32:01 -08:00
TreeHugger Robot
a47ab8b425 Merge "Make FileLogTest use robolectric" into ub-launcher3-master 2018-11-05 16:59:09 +00:00
Ryan Lothian
499a0c932e Make FileLogTest use robolectric
This allows it to run fast locally on the JVM without an
emulator or physical device.

Change-Id: Idb9c94e6f3fce94a86978ea0709eadd72280432c
2018-11-05 11:44:33 -05:00
Ryan Lothian
f4c42bc79a Migrate GridOccupancyTest to Robolectric
This allows it to run fast locally on the JVM without an
emulator or physical device.

Change-Id: I416877d7c335a7b9c8dc7a216ecfeb1013f66891
2018-11-05 10:52:40 -05:00
Vadim Tryshev
ba8957b3c2 Converting ShortcutsLaunchTest gesture-stable
By converting to TAPL.

Bug: 110103162
Test; TaplTests

Change-Id: I788405f2e52cc0e29ebf69e58feda46b408e9eb9
2018-11-01 17:45:59 -07:00
Winson Chung
b3fe661860 Add kill-process call to TestCommandReceiver
Bug: 117888000
Test: On Nexus side
Change-Id: I4803a884ffe8ae6147fdbaf98e2f813934418b76
2018-10-30 13:52:19 -07:00
Vadim Tryshev
f908a2e50e Adding test methods
Bug: 117888000
Test: Running new Nexus tests
Change-Id: I52a1f89add36dd38bbae8db262dd2e82280db130
2018-10-25 11:43:59 -07:00
Vadim Tryshev
34b6f9f106 Supporting OOP tests
AbstractLauncherUiTest was modified to compile and work both in- and
out- of proc.

Bug: 113056917
Test: was in Nexus branch
2018-10-13 01:13:45 +00:00
Sunny Goyal
4470344529 Fixing BindWidgetTest failing on Launcher3
Bug: 117616326
Change-Id: I3d08defc735498305cf982b214f6c0fae1508bd9
2018-10-11 16:06:52 -07:00
Vadim Tryshev
14c6c8cee4 Improving tests to fix testBindNormalWidget_withoutConfig, and beyond
1. Make waitXXX methods fail if the condition diesn’t turn true.
2. Waiting for loading to complete in tearDown instead of reloading the
 model
3. Avoiding waiting for load-complete where loading didn’t start
4. Disabling last test in AddConfigWidgetTest
5. Waiting for loading to complete inside setupAndVerifyContents(), not
 outside
6. Unifying how we wait for loader to complete
7. Adding more logging

Bug: 117332845
Test: running all Nexus tests
Change-Id: I3070e1ac2b9161179cc3e0800b0cd8162807389a
2018-10-09 18:47:42 -07:00
TreeHugger Robot
02e900c3c9 Merge "Adding tests for fallback recents when a 3rd party launcher is installed" into ub-launcher3-master 2018-10-09 21:32:19 +00:00
Sunny Goyal
4ed58d6c03 Adding tests for fallback recents when a 3rd party launcher is installed
Change-Id: I1d4da13cc779f49832008b12b9628d01631faffe
2018-10-09 14:25:01 -07:00
Vadim Tryshev
2d5713634e Ignoring more tests
Bug: 117106893
Test: will see on TAP
Change-Id: Ic031cc6756473552fc11186f666bcb9debfcecb5
2018-10-09 10:31:33 -07:00
TreeHugger Robot
9720452363 Merge "Converting long item IDs to int" into ub-launcher3-master 2018-10-08 23:27:27 +00:00
Vadim Tryshev
b769edec46 Ignoring more tests
Bug: 117106893
Test: will see on TAP
Change-Id: I992edaff5e40e8c16188033b5cbda6b0228fc2b6
2018-10-08 16:05:11 -07:00
Sunny Goyal
efb7e84242 Converting long item IDs to int
> Items ids were already being typecasted to int when being bound on the UI
> Using a consistent type allow better use of platform data-structures
> Adding IntArray and IntSet as a replacement for various Collection classes

Change-Id: Id3c650ed2420c2bfca3bd7671d2b705b56112371
2018-10-08 14:52:39 -07:00
Vadim Tryshev
a7da86e14a More temporary logging to diagnose testPendingWidget_autoRestored
And waiting to loader to finish to improve determinism.

Bug: 117332845
Test: running Launcher
Change-Id: Icdfce969b61f8ceb952a2715037783458da4d4c4
2018-10-05 20:05:34 -07:00
Vadim Tryshev
51146bc7e6 Merge "Adding temporary logging to diagnose testPendingWidget_autoRestored" into ub-launcher3-master 2018-10-06 01:28:00 +00:00
Vadim Tryshev
c052e4e68a Adding temporary logging to diagnose testPendingWidget_autoRestored
This test fails

Bug: 117332845
Test: running Launcher
Change-Id: I300c856992b3d1f559c4c31525a45e2c4a960f11
2018-10-05 17:37:01 -07:00
Vadim Tryshev
acc9bbef6c Revert "Uncommenting WorkTabTest"
This reverts commit f76ea29772.

Reason for revert: The test now fails on ATP

Change-Id: Ic7bd89e61f4107338bbfaf63628646af427668d3
2018-10-05 21:51:53 +00:00
Vadim Tryshev
f76ea29772 Uncommenting WorkTabTest
It started to work locally in condition, I believe, identical to those
on ATP.

Bug: 112899690
Test: adb shell am instrument -e size large -w -r -e debug false com.google.android.apps.nexuslauncher.tests/androidx.test.runner.AndroidJUnitRunner
Change-Id: I2decb2142d15e025402c0c32b7b161dd28d102bb
2018-10-05 13:27:40 -07:00
Vadim Tryshev
4ada2d2cde Resetting loader state after each UI test run
This is to prevent tests from affecting tests running after them.

Bug: 117332845
Test: Ran all tests; will see on TAP
Change-Id: Ie93ef30477eb069c6b4df48c6fceaceb968edaf4
2018-10-05 12:03:17 -07:00
Vadim Tryshev
c295098e18 Enabling "in test harness" flag with a direct call
This allows running in-proc tests without enabling test harness on
Android and restarting Launcher.

Bug: 110103162
Test: TaplTests
Change-Id: Ife44eff4760eb1349a10847efe2c1f27643bf146
2018-10-04 16:33:45 -07:00