Skip to content

Design questions

Bartosz Majsak edited this page Jul 7, 2017 · 13 revisions

SPI considerations

  • how to determine which classes / sources are tests?
    • mvn-surefire can pass patterns for inclusion/exclusion (as it's how it works anyway)
  • we will need factories for SPI implementations relying on what the caller has available, e.g. git will need hashes of previous checkout and current head
  • probably the best way of passing parameters would be having hashmap of strings with keys and strings to isolate strategies from provider, then the planners take those parameters that are needed
  • where should be the creation logic of the available planners - in the provider or in the core? As a reference use this comment: https://github.com/arquillian/smart-testing/pull/7#discussion_r116163265

Implementation/Design questions

  • how to manage an intersection of two strategies - eg. changed, failed - When changed are first, then the intersection is contained by the first strategy, but shouldn't be the second strategy applied inside of the set of changed ones? Example, we have tests [A B C D E F] where [B C E] are changed and [E F] are failed; applying the first strategy (changed) the order would be [B C E A D F], then what to do with the second strategy? F could be moved, but what should we do with E? I would separate the set retrieved from the first strategy to two sets [B C E] [A D F] and the second strategy apply in both sets => [E B C] [F A D]
  • Some calculations are run several times. For example, Git commits are scanned for changed strategy and for affected strategy. We should avoid this recalculation over and over. Should we do in a service platform with cache facilities or for example create a context where everything is stored?

Hub

  • One of the ways to know which tests to run and in which order is by inspecting previous test runs. We need some kind of hub/server accessible by the tool so it can retrieve and insert this information. Probably we will need to create some hooks for local runs (for demos) and integrating with Jenkins system as well.
Clone this wiki locally