Skip to content

RAT-541: create testhelpers.data package#655

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

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

Conversation

@Claudenw
Copy link
Copy Markdown
Contributor

@Claudenw Claudenw commented May 10, 2026

** DO NOT MERGE **
Requires: #637

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:

  • Add Reporter.Output class to bind the report configuration, output xml document, and statistics into a single object as well as provide serialization and deserialisation for the same.
  • Change Reporter execute to return a Reporter.Output object.
  • Change Report to use Reporter.Output class
  • Add ReportConfiguration.Serde (Serializer / Deserializer) class to serialize ReportConfiguration
  • Add ReportConfiguration.serde() method to get the Serde instance
  • Add ReportConfiguration.IODescriptor record to contain an IOSupplier and a name for the supplier.
  • Change out and stylesheet configuration to use IODescriptor
  • Add ReportConfiguration.DeserializedReportable record as extending IReportable to prevent execution of deserialized reportable objects.
  • Change Arg to restrict input / output to the directory tree under the working directory.
  • Change StyleSheets to return IODescriptors.
  • Add ExclusionProcessor.Serde class
  • Make XMLConfigurationReader.nodeListConsumer() and XMLConfiguraitonReader.attributes() public static methods.
  • Add LicenseSetFactory.validate() to verify that the license definitions are consistent.
  • Change IReportable getName() to name() in order to allow Java record to implement it.
  • Add ClaimStatistic.Serde class.
  • Move FileUtils from testhelpers package to utils package.
  • 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 af a test.
  • Modify RatCheckMojo to use Reporter.Output and preserve output for RatReportMojo

@ottlinger ottlinger changed the title Rat 541 create testhelper data package RAT-541: create testhelper data package May 10, 2026
Change to ReportConfiguration.IODescriptor usage
@Claudenw Claudenw changed the title RAT-541: create testhelper data package RAT-541: create testhelpers.data package May 24, 2026
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.

1 participant