tree: 73984fb75826b53dbcc9b0b2ba77cc25b0c897b0 [path history] [tgz]
  1. build/
  2. src/
  3. templates/
  4. testdata/
  5. BUILD.gn
  6. OWNERS
  7. README.md
tools/testgen/README.md

testgen

testgen generates a Fuchsia test.

Usage

fx testgen --help

Prefer running this tool from the root directory of the Fuchsia checkout.

Quickstart

To generate an integration test for a Fuchsia component use:

# Generate an integration test
fx testgen -v integration_test \
    --test-root ./src/my/tests \
    --component-manifest ./src/my/component/meta/my_component.cml

# Run the test (assumes you have a device & package server running).
fx set core.x64 --with //src/my/tests
fx build
fx test

The generated test should build, run and pass. The generated code will contain lines that look like this:

// FIXME: ...

These lines indicate places where the User should add their own code. grep for these lines to get started.