eeverman / eeverman/andhow

andhow-junit5-extensions should not be a dependency of andhow-core

Open
#739 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
25
Forks
34
PR merge metrics
No merged PRs in 30d

Description

Currently, andhow-core has a dependency on andhow-junit5-extensions so that core can use some of the junit5 annotations in core tests. This makes it very tricky to write additional extensions that integrate with the AndHow API because andhow-junit5-extensions cannot depend on andhow-core (that would be cyclical).

This dependency should go the other way: andhow-junit5-extensions should have an optional dependency on andhow-core. That would mean that AndHow could not use the junit5 extensions, but that would be worth fixing to add more full featured extensions.

Proposed changes:
- Split the junit5-extensions into two modules:
- junit5-extensions-standalone **with no** dependency on AndHow (this is possible for many of them). Move as much of the current junit5 code as possible into this module.
- junit5-extensions-andhow **with** a dependency on AndHow
- Update andhow-core to use only junit5-extensions-standalone (not andhow-junit5-extensions). This will have minimal impact
- Rewrite the KillAndHowBeforeThisTest annotation to become a standalone annotation in the test package of andhow-core. It could be build on some shared code from junit5-extensions-standalone.
- Look at the test-stubs module - with this new arrangement, is it still needed? Part/all of its original purpose was to allow testing of andhow-junit5-extensions without requiring a dependency on andhow-core.
- Rewrite the junit5-extensions-standalone module to just bundle to the two modules together as a single jar (similar to the andhow module)

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the andhow-core, junit5-extensions, and test-stubs module dependency declarations and the current JUnit5 extension tests. Trace which extensions require AndHow, then verify the proposed standalone and AndHow-specific module split and bundled jar against the full test suite. Done means andhow-core no longer depends on the AndHow-specific extensions, while the extensions remain usable and tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.