tree: b7e94a2f7f7eb9ade4eda194fd7e7ae0b69fc023 [path history] [tgz]
  1. meta/
  2. modular_config/
  3. agent_restart_test.cc
  4. agent_services_test.cc
  5. agent_session_restart_test.cc
  6. annotations_test.cc
  7. basemgr_test.cc
  8. basemgr_v2_test.rs
  9. BUILD.gn
  10. component_context_test.cc
  11. element_manager_test.cc
  12. inspect_basemgr_test.cc
  13. inspect_session_test.cc
  14. intents_test.cc
  15. intl_property_provider_test_client.h
  16. module_context_test.cc
  17. module_with_fake_runner.cc
  18. README.md
  19. session_shell_test.cc
  20. sessionctl_test.cc
  21. sessionmgr_integration_test.cc
  22. stories_share_session_runners_test.cc
  23. story_shell_factory_test.cc
  24. story_shell_test.cc
  25. test_service.test.fidl
src/modular/tests/README.md

Integration tests

Integration tests are written against client-facing FIDL services exposed by Modular. They make use of the Modular Test Harness.

Writing a new test

The easiest way to get started is to make a copy of an existing test. Be sure to:

  1. In BUILD.gn, add an entry to build the new test executable()
  2. Create a .cmx file in meta/ if the new test needs special capabilities
  3. In BUILD.gn, create a fuchsia_unittest_component() with the new executable() as a dependency
  4. In BUILD.gn, add the new fuchsia_unittest_component() as a test_component of the modular_integration_tests fuchsia_test_package()

Running tests

Run the following commands to build your tests:

fx set core.x64 --with //src/modular/tests
fx build

NOTE: You only need to run fx set once.

Running all tests

fx test modular_integration_tests

Running one test

Add the following to the above command:

-- --gtest_filter="{ClassName}.{TestName}"