ADRs/0006 - Test architecture.md
Proposed
Proposed by: Adam Gibson (21-03-2021)
Discussed with: N/A
DL4J was a junit 4 based code based for testing. It's now based on junit 5's jupiter API, which has support for Tags.
DL4j's code base has a number of different kinds of tests that fall in to several categories:
Due to the variety of behaviors across different tests, it's hard to tell what's actually needed for running and validating whether changes work against such a complex test base.
Much of the time, most of the tests aren't related to a given change. Often times, quick sanity checks are all that's needed in order to make sure a change works.
A common set of tags is used to filter which tests are needed to run when. This allows us to retain complex integration tests and run them on a set schedule to catch regressions while allowing a defined subset of tests to run for a quick feedback loop.
A few kinds of tags exist:
Ability to sort through and filter tests based on different running environments
Ability to reason about test suites as a whole dynamically across modules
Avoid the need to define test suites
Ability to define groups of tags based in profiles
Ability to dynamically filter tests from the maven command line
Documentation and maintenance burden needing to know what tags do what
Test maintenance for newcomers who may not know how to tag tests