Skip to content

feat(version-tests): Add comprehensive API coverage to TagsTester#443

Draft
Liljis wants to merge 1 commit intodocling-project:mainfrom
Liljis:feature/version-tester
Draft

feat(version-tests): Add comprehensive API coverage to TagsTester#443
Liljis wants to merge 1 commit intodocling-project:mainfrom
Liljis:feature/version-tester

Conversation

@Liljis
Copy link
Copy Markdown

@Liljis Liljis commented Apr 4, 2026

Description

Expanded the version compatibility tests in TagsTester.java to include comprehensive API coverage beyond just the convert source endpoint, as requested in #134.

Changes Made

Added 5 new test methods to doConversion() in TagsTester.java:

  1. testConvertWithMultipleFormats - Tests conversion with MARKDOWN, JSON, and TEXT output formats ( already existed, done only refactoring)

  2. testConvertWithJsonFormat - Validates JSON output and DoclingDocument deserialization

  • Requests only JSON format
  • Tests: "Can we properly deserialize the JSON into a DoclingDocument Java object?"
  • Validates: The JSON structure is correct and can be parsed into the Java class
  • Checks: Specific fields like getName() work correctly
  1. testConvertWithDifferentOptions - Tests conversion with OCR, images, table mode, and custom timeout
  • Extracts text from images in the document
  • Embeds or references images in the converted output
  • Controls how tables are extracted and formatted
  • Sets maximum time for document processing
  1. testClearConverters - Tests the /v1/clear/converters endpoint
  • Clears cached converter instances (PDF parsers, OCR engines, etc.)
  1. testClearResults - Tests the /v1/clear/results endpoint
  • Clears cached conversion results (the actual converted documents)

Motivation

The previous implementation only tested the basic convert source API. This enhancement provides:

  • Better coverage of the Docling Serve API surface
  • Validation of multiple endpoints (health, convert, clear)
  • Testing of various conversion options and output formats
  • More comprehensive compatibility checks across versions

Test Results

  • Build successful with no compilation errors
  • All v1.x versions (v1.0.0+) pass all 6 tests
  • v0.x versions fail as expected (AP
    results.md

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