1# Testing
2
3---
4
5## Unit tests
6
7New WM Shell unit tests can be added to the
8[Shell/tests/unittest](frameworks/base/libs/WindowManager/Shell/tests/unittest) directory, and can
9be run via command line using `atest`:
10```shell
11atest WMShellUnitTests
12```
13
14If 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
17These unit tests are run as a part of WindowManager presubmit, and the dashboards for these unit
18tests tests can be found at [go/wm-tests](http://go/wm-tests).
19
20This [GCL file](http://go/wm-unit-tests-gcl) configures the tests being run on the server.
21
22## Flicker tests
23
24Flicker tests are tests that perform actions and make assertions on the state in Window Manager
25and SurfaceFlinger traces captured during the run.
26
27New WM Shell Flicker tests can be added to the
28[Shell/tests/flicker](frameworks/base/libs/WindowManager/Shell/tests/flicker) directory, and can
29be run via command line using `atest`:
30```shell
31atest WMShellFlickerTests
32```
33
34**Note**: Currently Flicker tests can only be run from the commandline and not via SysUI Studio
35
36A subset of the flicker tests tests are run as a part of WindowManager presubmit, and the
37dashboards for these tests tests can be found at [go/wm-tests-flicker](http://go/wm-tests-flicker).
38
39## CTS tests
40
41Some 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
46These can also be run via commandline only using `atest`, for example:
47```shell
48atest PinnedStackTests
49```