apache / apache/maven-resolver

[MRESOLVER-677] Test suite for version comparison

Open
#1,347 0 comments 0 reactions 0 assignees View on GitHub
priority:major
Dominant language
Java
Stars
152
Forks
160
Avg merge
1d 4h
Merged PRs (30d)
49

Description

**[Elliotte Rusty Harold](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=elharo)** opened **[MRESOLVER-677](https://issues.apache.org/jira/browse/MRESOLVER-677?redirect=false)** and commented

ComparableVersion in core, maven resolver, and probably a few other places have independent code to parse and compare version numbers.

The test cases should be pulled out into a data document that is independent of the test suite or even language. That is, just a bunch of text (likely JSON or XML but maybe CSV for ease of JUnit integration) with two versions and the expected result. Then this can be loaded by the different version parsing libraries, perhaps including non-Maven things like Gradle and semver.

Use a parameterized test in JUnit 5 to pull in the test cases.

Fix any discrepancies between the independent code paths, and update docs as necessary.

---
No further details from [MRESOLVER-677](https://issues.apache.org/jira/browse/MRESOLVER-677?redirect=false)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating ComparableVersion in core, Maven Resolver, and the other version-parsing implementations mentioned in the issue. Define a language-independent document containing version pairs and expected comparisons, then use it with JUnit 5 parameterized tests. Done means the independent code paths have matching results and any necessary documentation is updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, json, xml
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.