Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 1 | # Flicker Test Library |
| 2 | |
| 3 | ## Motivation |
Nataniel Borges | 53f9301 | 2020-07-02 10:35:49 +0200 | [diff] [blame] | 4 | This set of tests use the flickerlib from `platform_testing/libraries/flicker` to execute a set of common UI transitions to detect discontinuous or unpredictable behavior. |
| 5 | |
| 6 | The tests are organized in packages according to the transitions they test (e.g., `rotation`, `splitscreen`). |
Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 7 | |
| 8 | ## Adding a Test |
Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 9 | |
Nataniel Borges | 0e9bb5a | 2024-04-05 12:56:36 +0000 | [diff] [blame] | 10 | By default, tests should inherit from `TestBase` and override the variable `transition` (Kotlin) or the function `getTransition()` (Java). |
Nataniel Borges | 53f9301 | 2020-07-02 10:35:49 +0200 | [diff] [blame] | 11 | |
Nataniel Borges | 0e9bb5a | 2024-04-05 12:56:36 +0000 | [diff] [blame] | 12 | Inheriting from this class ensures the common assertions will be executed, namely: |
Nataniel Borges | 53f9301 | 2020-07-02 10:35:49 +0200 | [diff] [blame] | 13 | |
Nataniel Borges | 53f9301 | 2020-07-02 10:35:49 +0200 | [diff] [blame] | 14 | * all regions on the screen are covered |
| 15 | * status bar is always visible |
Nataniel Borges | 0e9bb5a | 2024-04-05 12:56:36 +0000 | [diff] [blame] | 16 | * status bar is at the correct position at the start and end of the transition |
Nataniel Borges | 53f9301 | 2020-07-02 10:35:49 +0200 | [diff] [blame] | 17 | * nav bar is always visible |
Nataniel Borges | 0e9bb5a | 2024-04-05 12:56:36 +0000 | [diff] [blame] | 18 | * nav bar is at the correct position at the start and end of the transition |
Nataniel Borges | 53f9301 | 2020-07-02 10:35:49 +0200 | [diff] [blame] | 19 | |
| 20 | The default tests can be disabled by overriding the respective methods and including an `@Ignore` annotation. |
| 21 | |
Nataniel Borges | 0e9bb5a | 2024-04-05 12:56:36 +0000 | [diff] [blame] | 22 | For more examples of how a test looks like check `ChangeAppRotationTest` within the `Rotation` subdirectory. |
Nataniel Borges | 53f9301 | 2020-07-02 10:35:49 +0200 | [diff] [blame] | 23 | |