dart-lang / dart-lang/test

Provide `StreamChannel`s between workers and plugins

Open
#711 0 comments 3 reactions 0 assignees View on GitHub
plugin API type-enhancement
Dominant language
Dart
Stars
536
Forks
232
Avg merge
1d 10h
Merged PRs (30d)
10

Description

Right now, there's no way for code in a worker (isolate, iframe, etc) to communicate with a plugin. This could be useful, for example, for a reporter plugin that wants to report custom events from tests; or for a coverage plugin that wants to send a coverage data after all the tests have run.

It would be good to have a way to communicate both on a test-by-test basis and a suite-by-suite basis. For tests I'd imagine this would look like:

- [ ] a `StreamChannel LiveTest.channel(String name)` method that would connect to a matching call to `StreamChannel Invoker.testChannel(String name)`
- [ ] a `StreamChannel RunnerSuite.channel(String name)` method that would connect to a matching call to `StreamChannel suiteChannel(String name)` at the top level (which would be piped through `RemoteListener` via a zone variable)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing worker and plugin communication around LiveTest, Invoker, RunnerSuite, and RemoteListener. Define how named test and suite StreamChannels connect across isolates or iframes, including the proposed channel methods and zone-variable piping, then verify both communication scopes work for plugin events and post-suite data.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.