Skip to content

CARDS-2130: Increase test coverage of cards-data-model-subjects-impl - #1392

Open
sofi2002sofi wants to merge 2 commits into
devfrom
CARDS-2130-subjects-tests
Open

CARDS-2130: Increase test coverage of cards-data-model-subjects-impl#1392
sofi2002sofi wants to merge 2 commits into
devfrom
CARDS-2130-subjects-tests

Conversation

@sofi2002sofi

Copy link
Copy Markdown
Contributor

No description provided.

@sofi2002sofi
sofi2002sofi marked this pull request as ready for review March 10, 2023 00:11
@sofi2002sofi
sofi2002sofi requested a review from sdumitriu April 12, 2023 15:12
@veronikaslc

veronikaslc commented Jun 16, 2023

Copy link
Copy Markdown
Contributor

SubjectFullIdentifierEditorTest and SubjectParentEditorTest: case of RepositoryException if accessing the repository fails is not coved.
SubjectQuickSearchEngineTest, BareSubjectProcessoTest: case of RepositoryException is not covered too.
AbstractSubjectToStringSerializerTest: case of if (!"cards:Form".equals(nodeType)) is not covered from line 162 of AbstractSubjectToStringSerializer.
SimpleSubjectProcessorTest: not all cases covered from line 83 of SimpleSubjectProcessor.

@veronikaslc

Copy link
Copy Markdown
Contributor

jacoco.zip
jacoco:report html file attached

@sofi2002sofi
sofi2002sofi force-pushed the CARDS-2130-subjects-tests branch from b9e891a to 24be156 Compare August 5, 2023 20:53
@veronikaslc
veronikaslc force-pushed the CARDS-2130-subjects-tests branch 2 times, most recently from d036535 to 0f08fbf Compare December 6, 2025 06:33
sofi2002sofi and others added 2 commits July 27, 2026 20:49
Modernize the revived tests and complete the module coverage to 100%:
- migrate the tests to the current platform APIs: jakarta.json, Mockito 5,
  sling-mock 4
- drop the Mockito runner in favor of plain mocks with reflection
  injection, since concurrently running runners collide on Mockito's
  global listener registry under the parallel surefire configuration
- raise the sling-mock resource resolver factory timeout, the default
  500ms is not always enough when several Oak-backed test contexts start
  in parallel
- add tests for the previously uncovered classes:
  SubjectIdPatternValidator and its provider, and
  SubjectsWithModifiedFormsRetriever
- cover the previously untested paths: identifiers joined across several
  ancestors, computation failures while leaving a subject node, manual
  result counting stopping at the result limit, quick search skipping and
  null identifiers, non-form children skipped during text serialization
- fix a test that stubbed the wrong isNodeType argument and thus never
  exercised the exception handling it claimed to test
- rename the remaining vague test names
- remove the module's coverage exemption, restoring the default 1.00
  required instruction coverage ratio
@sdumitriu
sdumitriu force-pushed the CARDS-2130-subjects-tests branch from 0f08fbf to dfbc8a1 Compare July 27, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants