We had previously made the decision to serialize the tree representing the test in the GraphQL API as JSON in order to facilitate fetching it without resorting to complicated query generation via fragments or otherwise. However, the moment we needed to actually work with the tree by sending back test results in order to match the tree, it became clear that we'd want to have the result structure match the tree structure.
Approach
This goes back to serving the test tree as a strongly typed GraphQL structure that preserves the recursive nature. In addition to restoring the tree, each test is now annotated with both a path (Array) and an id (String) that are unique to that test node. This can be used to match test results with tests, and also to specify a subset of tests to run.
Finally, since it was easier to do at this point rather than not, the Manifest interface was updated to account for unique identification of manifests by URL.
Screenshots
Open Questions
Would it make sense to have the server somehow integrate active test runs and results along with the test tree? That would certainly make it easier for clients to display results rather than do the work to interleaving them on their end.
closes #94
Motivation
We had previously made the decision to serialize the tree representing the test in the GraphQL API as JSON in order to facilitate fetching it without resorting to complicated query generation via fragments or otherwise. However, the moment we needed to actually work with the tree by sending back test results in order to match the tree, it became clear that we'd want to have the result structure match the tree structure.
Approach
This goes back to serving the test tree as a strongly typed GraphQL structure that preserves the recursive nature. In addition to restoring the tree, each test is now annotated with both a
path
(Array) and anid
(String) that are unique to that test node. This can be used to match test results with tests, and also to specify a subset of tests to run.Finally, since it was easier to do at this point rather than not, the
Manifest
interface was updated to account for unique identification of manifests by URL.Screenshots
Open Questions