Every Honeydew host target interaction API must have at least one functional test case that ensures the API works as intended. For example, a functional test checks that <device>.reboot()
actually reboots the Fuchsia device.
Running a functional test case requires a Fuchsia device. There can be many different Fuchsia <BOARD>
s that support multiple <PRODUCT>
configurations. Decide which <PRODUCT>
and <BOARD>
to use following this approach:
<PRODUCT>
configuration that the corresponding functional test requires.trace
affordance test cases, use core
session
affordance test cases, use terminal
(as core
does not support it)<BOARD>
<device>.reboot()
) has a special implementation for this particular product that requires explicit verification.Check that the device type that the test runs on (will be listed in “device_type” field in test case's BUILD.gn file) is connected to the host and detectable by FFX:
$ ffx target list NAME SERIAL TYPE STATE ADDRS/IP RCS fuchsia-emulator* <unknown> core.x64 Product [fe80::1a1c:ebd2:2db:6104%qemu] Y
Learn more about setting up these devices:
Determine if your local testbed requires a manual local config. For more information, refer to Lacewing Mobly Config YAML file) Tip: You can most likely skip this step, if your test needs only one fuchsia device and if your host has only that one device connected.
Run appropriate fx set
command along with --with //src/testing/end_to_end/honeydew/tests/functional_tests
param.
SL4f
transport, then make sure to do the following:<PRODUCT>
that supports SL4F
(such as core
)--args=core_realm_shards+="[\"//src/testing/sl4f:sl4f_core_shard\"]"
fx set
without the --args
option, and then run fx args
, and add the line directly to the args.gn
file in the editor that opens.If test needs SL4F, then run a package server in a separate terminal
$ fx -d <device_name> serve
Run fx test
command and specify the target
along with --e2e --output
args
Here is an example to run a functional test on emulator
$ fx set core.x64 --with //src/testing/end_to_end/honeydew/tests/functional_tests:tests # start the emulator with networking enabled $ ffx emu stop ; ffx emu start -H --net tap $ fx test //src/testing/end_to_end/honeydew/tests/functional_tests/fuchsia_device_tests/test_fuchsia_device:x64_emu_test --e2e --output
*_packages
group. Please reach out to Lacewing team if you need help with this one. And also, please include Lacewing team as one of the reviewer in this CL.python_mobly_test
rule in BUILD.gn to include appropriate BOARDS (based on what all the boards this test need to be run in infra) in environments
field (example)Lacewing test case can be run in Infra in of the following builder types:
Use the following approach in deciding whether to run the test case in CQ/CI/FYI:
Once your test case is ready to be promoted to CI/CQ:
stable
Honeydew Infra Test Groups exists, and that test group is already enabled in a CQ builder, simply move your test target from unstable
to stable
.Accordingly, we have created the following:
<PRODUCT>_<BOARD>_<STABILITY>[ |_sl4f]_tests
<PRODUCT>
- The product that the tests require to run on - e.g. “core”, “workbench”.<BOARD>
- The board that the tests require to run on - e.g. “emulator”, “nuc”, “vim3”.<STABILITY>
- Whether tests are stable or flaky - “stable” or “unstable”. All newly added tests must be added to the “unstable” groups until 200 passing runs in infra FYI builder have been observed, after which they may be promoted to “stable” groups.[ |_sl4f]
- If tests require SL4F server then include “_sl4f”. Otherwise, leave it empty.core_emulator_stable_tests
workbench_vim3_unstable_tests
<STABILITY>
informs whether a group is potential to run in CI/CQ (as it depends on <BOARD>
also).[ |_sl4f]
informs whether a test group can be run on certain products.<BOARD>
informs whether a test group can be run on certain boards.<PRODUCT>_<BOARD>_<STABILITY>[ |_sl4f]_packages
<PRODUCT>.<BOARD>-[debug|release]-lacewing-[ |staging|ci]
-staging
or -ci
)core.x64-debug-lacewing
- CQ builder to run stable emulator and NUC testscore.x64-debug-lacewing-staging
- FYI builder to run unstable emulator and NUC testscore.vim3-debug-lacewing-staging
- FYI builder to run unstable VIM3 tests