Commit Graph

15 Commits

Author SHA1 Message Date
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
3ff83743e2 Remove flaky from default excluded tests
Atest cannot override include-annotation and exclude-annotation from the Android.xml, only append new ones.

Ideally we should have a single test configuration for all flicker tests (presubmit/postsubmit/flaky) and adjust the arguments according to the type of test we intend to run.

Presubmit:
    atest FlickerTests -- --module-arg FlickerTests:include-annotation:android.platform.test.annotations.Presubmit --module-arg FlickerTests:exclude-annotation:androidx.test.filters.FlakyTest

Postsubmit:
    atest FlickerTests -- --module-arg FlickerTests:include-annotation:android.platform.test.annotations.Postsubmit --module-arg FlickerTests:exclude-annotation:androidx.test.filters.FlakyTest

Flaky:
    atest FlickerTests -- --module-arg FlickerTests:include-annotation:androidx.test.filters.FlakyTest

To run WMShellFlickerTests, just replace FlickerTests for WMShellFlickerTests in the commands above.

Bug: 170490377
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Ic252f27065714e9039e3c0f33659b98eb288aa6f
2021-02-08 14:19:09 +01:00
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
Nataniel Borges
2b707c571b Use annotation for tests that require a device
Currently all flicker tests run on a physical devices.

In the future, some flicker tests may run on a physical devices
and others may run on virtual devices for scalability. In this CL
we use the "RequireDevice" annotation to indicate which tests should
run on device

Test: atest FlickerTests
Change-Id: I472c30612535310265717a5ae420feb534159c41
2020-08-24 21:05:47 +02:00
Nataniel Borges
f4cf0fb915 Use only @FlakyTest annotations on FlickerTests
Currently the FlickerTests tests do not work with @FlakyTest annotation, depending instead on @Ignore. Fix dependencies so that it requires only @FlakyTest annotations now.

Test: atest FlickerTests
Change-Id: If762c5d9f9844885fbd998177512decb08dcf125
2020-07-17 16:25:43 +02:00
Nataniel Borges
3bc59bb03b Use Android Q compatible external dir
We previously used Environment.getExternalDir to obtain the output dir for the tests. However, since Android Q this method is deprecated and returns an invalid path, leading to errors. Replace this method for context.getExternalDir(null) that return a Q  friendly path.

Test: atest FlickerTests
Bug: 161341377
Change-Id: I5389ac6116b2b74fb19417683dbcfca604ca5b58
2020-07-16 18:03:26 +02:00
Nataniel Borges
545adf8d3e Revert "Use RunHostCommandTargetPreparer to enable TAPL"
This reverts commit e7e97b7274.

Reason for revert: While this command works locally (atest) on all build types, it does not work when multiple devices are simultaneously connected to the computer

Change-Id: I9744d02f0eafe2fef3076c62cd07a8cac05546da
2020-04-21 16:36:00 +00:00
Nataniel Borges
e7e97b7274 Use RunHostCommandTargetPreparer to enable TAPL
Currently the flicker tests use the GoogleDeviceSetup to activate TAPL
and allow the launcher instrumentation to execute. This method, however
did not work under all conditions and resulted in b/153565763.

To fix this problem we now run the commands with RunHostCommandTargetPreparer.

Test: On a freshly flashed and wiped device run atest FlickerTests
Bug: 153565763
Change-Id: Ia5878ad9ca832be03d3ec3e1f93ca810db121706
2020-04-14 06:56:22 +00:00
Nataniel Borges
7ac1793496 Enable test harness flag before the test
The test harness must be enabled to alllow the test to interact with
TAPL (launcher), otherwise the test crashes with an "Error granting
runtime permission" exception.

Test: atest FlickerTests
Change-Id: I5fffa4e756fab7ab4abca8a4d301f3c01e1297ce
2020-03-30 13:13:23 +02:00
Nataniel Borges
992a155b61 New FlickerTests: Create initial flicker tests for Pip
Create an initial set of tests for pip. Initial tests are:
- All regions covered
- Status and navigation bar is always visible
- Pip window is shown, expanded, closed, and doesn't flicker
- Pip layer is shown, expanded, closed, and doesn't flicker
- Background is displayed behind Pip window

Test: atest FlickerTests:PipToHomeTest and atest FlickerTests:PipToAppTest
Change-Id: I16345de39a799744b97a5390495538d568693222
2020-02-25 12:54:43 +01:00
Nataniel Borges
9f2ad75a6e Automatically clean up flicker test data
Currently the flicker tests leave data on the /sdcard/flicker directory. We now clean up this data after the test.

The logs are still available in the atest results directory.

Test: atest FlickerTests
Change-Id: Ia83cbedff3104964e3d4be14a7c035f2193d36a8
2019-12-04 10:38:42 +01:00
Nataniel Borges
eb63fdd6e5 Don't remove flicker test logs from device for easier debugging
Test: atest FlickerTests
Change-Id: Id8a7869967df2ccd2e905c61cc1a348ae06d4430
2019-09-18 17:17:35 +02:00
Julien Desprez
c82d3e9e3c Explicitly exclude @Ignore annotation
Some flicker class are marked Ignored causing some issue
with the AJUR runner. To avoid them, simply filter it.

Test: None
Bug: 129468528
Change-Id: I6442204eb6f89b4bf90a39ee821ebc4daebbe120
2019-03-28 08:50:03 -07:00
Hsin-Yi Chen
677a0025cb Replace GoogleDeviceSetup with DeviceSetup in FlickerTests
This commit replaces GoogleDeviceSetup which is not on AOSP.

Test: atest FlickerTests
Bug: 128877715
Change-Id: I2e4167dd7e4e5ef3352cb8fda2f753a0acf2f600
2019-03-19 05:31:40 +00:00
Vishnu Nair
8248b7c995 Move FlickerTests to frameworks/base/tests 2/2
platform_testing is moving to AOSP first development. FlickerTests may require access to
in development test apis and cannot be developed in AOSP.

Other minor changes:
- remove FlickerTests from APCT. FlickerTests will use TEST_MAPPING
- use @FlakyTest instead of @Ignore annotation to skip tests

Test: atest FlickerTests
Test: make -j32 continuous_instrumentation_tests
Test: cd frameworks/base/tests/FlickerTests/ && atest :postsubmit

Bug: 112044297
Change-Id: Icc3194ddd9b801034d8797bf2ec60ebff071612c
2018-08-01 10:13:36 -07:00