Skip to content
Snippets Groups Projects
Commit 8ef100b1 authored by Vardhan Mudunuru's avatar Vardhan Mudunuru Committed by CQ bot account: commit-bot@chromium.org
Browse files

[modular][testing] Teach TestHarness to inject services.

This CL implements features which were needed to enable using Flutter
Driver under the test harness.

Fixes:
==
* Fix test_session_shell to implement |SessionShell| and hold onto views
plumbed from AttachView; these keeps views alive and lets test harness
run flutter driver tests. This is tested by a CL using flutter driver in
 //topaz.

* Give each test harness environment a random name, so one test harness
doesn't conflict with another if both happen to be running.

New features:
==
a) TestHarness accepts a mapping of Service name -> component URL to
inject services in the hermetic environment it creates. It works
similarly to fuchsia.test CMX facet's injected services. This is
provided using TestHarnessSpec.injected_services
  - This is used to let flutter driver tests specify, and prevent
  modular_test_harness.cmx (and the test component), declaring services
  they want to use from the environment.

b) Introduce TestHarness.ConnectToEnvironmentService, which lets you
connect to environment services injected using a).

a) and b) are tested together in the TestHarnessImplTest.InjectServices
test.

Other:
* Rename TestHarness.GetService -> TestHarness.ConnectToModularService
* Updating existing tests to use injected services.

Change-Id: If940c8173f04eea36ee71934cf37e6e2a5b67834
parent 3d909bd9
No related branches found
No related tags found
Loading
Showing
with 351 additions and 74 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment