Tests that exercise launching elements may use a reference element provided by the CTS.
The test suite ships with a reference session implementation that passes all tests. It is a minimal session that contains just enough to exercise the tests, and is not intended to be a fully-fledged example of a product.
The reference session is not tailored specifically for the test environment. Neither the tests nor the reference session know about each other’s existence, as to avoid coupling tests to a particular session implementation.
The reference session reuses platform-provided components as much as possible. This encourages code reuse between products and frees developers from worrying about implementing boilerplate functionality (e.g. launching element components). This code needs to be packaged as a component, not a library, because the CTS may only depend on SDK atoms.
element_manager_test
: Proposing an element is successfulThe simplest possible test for the fuchsia.element.Manager protocol proposes an element and asserts that the result was successful.
$ fx set core.x64 --with-base "//sdk/cts" $ fx test fuchsia-element-tests -o