| 1 | # Testing |
| 2 | |
| 3 | --- |
| 4 | |
| 5 | ## Unit tests |
| 6 | |
| 7 | New WM Shell unit tests can be added to the |
| 8 | [Shell/tests/unittest](frameworks/base/libs/WindowManager/Shell/tests/unittest) directory, and can |
| 9 | be run via command line using `atest`: |
| 10 | ```shell |
| 11 | atest WMShellUnitTests |
| 12 | ``` |
| 13 | |
| 14 | If you use the SysUI Studio project, you can run and debug tests directly in the source files |
| 15 | (click on the little arrows next to the test class or test method). |
| 16 | |
| 17 | These unit tests are run as a part of WindowManager presubmit, and the dashboards for these unit |
| 18 | tests tests can be found at [go/wm-tests](http://go/wm-tests). |
| 19 | |
| 20 | This [GCL file](http://go/wm-unit-tests-gcl) configures the tests being run on the server. |
| 21 | |
| 22 | ## Flicker tests |
| 23 | |
| 24 | Flicker tests are tests that perform actions and make assertions on the state in Window Manager |
| 25 | and SurfaceFlinger traces captured during the run. |
| 26 | |
| 27 | New WM Shell Flicker tests can be added to the |
| 28 | [Shell/tests/flicker](frameworks/base/libs/WindowManager/Shell/tests/flicker) directory, and can |
| 29 | be run via command line using `atest`: |
| 30 | ```shell |
| 31 | atest WMShellFlickerTests |
| 32 | ``` |
| 33 | |
| 34 | **Note**: Currently Flicker tests can only be run from the commandline and not via SysUI Studio |
| 35 | |
| 36 | A subset of the flicker tests tests are run as a part of WindowManager presubmit, and the |
| 37 | dashboards for these tests tests can be found at [go/wm-tests-flicker](http://go/wm-tests-flicker). |
| 38 | |
| 39 | ## CTS tests |
| 40 | |
| 41 | Some windowing features also have CTS tests to ensure consistent behavior across OEMs. For example: |
| 42 | - Picture-in-Picture: |
| 43 | [PinnedStackTests](cts/tests/framework/base/windowmanager/src/android/server/wm/PinnedStackTests.java) |
| 44 | - etc. |
| 45 | |
| 46 | These can also be run via commandline only using `atest`, for example: |
| 47 | ```shell |
| 48 | atest PinnedStackTests |
| 49 | ``` |