Page MenuHomePhabricator

AQS 2.0: Implement Test Framework for Druid-based Endpoints
Closed, ResolvedPublic

Description

Implement unit test framework for the Druid-based endpoints from the Edit Analytics and Editor Analytics services.

The existing production service includes almost 200 unit tests for the corresponding endpoints, as listed in T316849: Audit tests for Druid-based endpoints. For testing parity, we should create equivalent tests. However, creating 200 cut-and-paste unit tests would result in a testing structure that is difficult to read, difficult to maintain, and difficult to extend. Instead, create a "framework" of some type, likely consisting of a set of common functions, to capture the boilerplate portion of the tests. Individual tests should then be compact and straightforward.

The existing production tests implementation does something like this and could be used as inspiration. But because the differences in testing approach are so large, and because the implementation language is different, nothing in the existing production tests will be directly usable.

If we create something suitably useful, we may refactor the other AQS 2.0 tests that we've already written to use something similar. We could even consider making it part of a shared repository. However, that is only a possibility for us to consider. If we choose to do that, we should create one or more tasks for that work.

Completion criteria for this task is that we are ready to implement unit tests for the relevant services using whatever system we come up with:

Event Timeline

Sfaci triaged this task as Medium priority.
Sfaci edited projects, added AQS2.0 (Sprint 10); removed AQS2.0.
Sfaci moved this task from Next Up to In Progress on the AQS2.0 (Sprint 10) board.
This comment was removed by Sfaci.
BPirkle renamed this task from AQS 2.0: Implement Unit Test Framework for Druid-based Endpoints to AQS 2.0: Implement Test Framework for Druid-based Endpoints.Jun 22 2023, 3:16 PM