Skip to content

RAT-541: create testhelpers.data package - #655

Draft
Claudenw wants to merge 38 commits into
masterfrom
RAT-541_create-testhelper_data-package
Draft

RAT-541: create testhelpers.data package#655
Claudenw wants to merge 38 commits into
masterfrom
RAT-541_create-testhelper_data-package

Conversation

@Claudenw

@Claudenw Claudenw commented May 10, 2026

Copy link
Copy Markdown
Contributor

Overview

The testselpers.data package is intended to provide test definition and validation in a UI agnostic manner.

Specifically tests for UIs will be provided with the internal command line structure. They will convert that into the UI based configuration definition and execute the report. The result of the report will the be validated by the test definition.

In order to do this across multiple UI implementations the Reporter.Output class was developed. This contains the ReportConfiguration, the XML document generated during the run, and the ClaimStatistics (results).

TestData

The TestData class is the test definition and contains the instructions to setup a directory structure for the test, a list pairs of commons.cli.option and an array of string that is the list of arguments for the option, and a validator to validate the results.

ValidatorData

The ValidatorData contains the Reporter.Output and the base directory into which the test data was written and from which the report was run.

Testing changes

The test changes in this PR are minimal and mostly revolve around the change in Reporter.execute() to returning the Reporter.Output object

Specific Changes:

  • Make XMLConfigurationReader.nodeListConsumer() and XMLConfiguraitonReader.attributes() public static methods.
  • Add LicenseSetFactory.validate() to verify that the license definitions are consistent.
  • Add xhtml5 stylesheet
  • Add BaseOption test class to provide testing UIOption implementation.
  • Add BaseOptionCollection test class to provide testing UIOptionCollection of UIOption implementation.
  • Update TestingLog to support multiple log levels .
  • Add TestData class to setup and verify a test in a UI implementation agnostic way.
  • Add AbstractTestDataProvider to generate standard TestData objects.
  • Add DataUtils class to provide utilities to data testing.
  • Add ReportTestDataProvider implementation of AbstractTestDataProvider to test Report.
  • Add Validator data to provide data to valideate the outcome of a test.
  • Move CommandLine creation/processing into ArgumentContext.
  • Modify RatCheckMojo to use Reporter.Output and preserve output for RatReportMojo

Additional changes

Additional changes made to resolve some spotbugs errors.

@ottlinger ottlinger changed the title Rat 541 create testhelper data package RAT-541: create testhelper data package May 10, 2026
@Claudenw Claudenw changed the title RAT-541: create testhelper data package RAT-541: create testhelpers.data package May 24, 2026
Comment thread apache-rat-core/src/main/java/org/apache/rat/Reporter.java Fixed
Comment thread apache-rat-core/src/main/java/org/apache/rat/Reporter.java Fixed
@Claudenw
Claudenw force-pushed the RAT-541_create-testhelper_data-package branch 3 times, most recently from fddbe0b to c484029 Compare June 25, 2026 10:06
Claudenw and others added 24 commits July 20, 2026 19:13
Add testing
Expanded testing to include multiple file system types
Fix recursion issue in DocumentName equals and compareTo
Additional migration to assertj
Changed File options to return DocumentName instances.
Cleaned up Sonar review issues
Change to ReportConfiguration.IODescriptor usage
Reworked tests for more complete coverage.
Fixed issue with ReportTestDataProvider.java
Add testing
Expanded testing to include multiple file system types
Fix recursion issue in DocumentName equals and compareTo
Additional migration to assertj
Changed File options to return DocumentName instances.
Cleaned up Sonar review issues
@Claudenw
Claudenw force-pushed the RAT-541_create-testhelper_data-package branch from 7ba796d to fd06cde Compare July 23, 2026 21:20
@Claudenw
Claudenw marked this pull request as ready for review July 26, 2026 10:34
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@Claudenw
Claudenw marked this pull request as draft July 27, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants