Add new run handler for test controller #3251
Open
+474
−181
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Closes #3177
This PR adds a new run handler for the test controller, which asks the server for the resolve commands and then executes them with streaming updates.
Important: after this PR, there are still some details to iron out and this doesn't fully work out of the box. For example, we need the Test Unit reporter to automatically do this:
We also may need a way for add-ons to register their reporter paths so that they are required automatically.
However, this implements the bulk of the integration, so it will be easier to deal with the other details once this is shipped.
Implementation
Automated Tests
The easiest way I found of testing this is to create a small fake test server script, so that we can mock the resolve commands return and still have something that will print JSON RPC notifications.
I also extract a common part of the test.