Skip to main content

Compare HTML files by rendered output

Project description

htmlcmp

Tool to compare (generated) HTML files visually and automatically using Selenium.

Provides various entry points to run:

  • compare-html is a CLI tool to compare two directory structures containing HTML files
  • compare-html-server starts a webserver and allows to inspect differences manually
  • html-render-diff renders two HTML files and produces images
  • html-tidy allows to run HTML tidy on a directory

Used for regression testing in https://github.com/opendocument-app/OpenDocument.core.

Install via PyPI

pip install htmlcmp

Download and run the docker image

docker pull ghcr.io/opendocument-app/odr_core_test
docker run -ti \
  -v $(pwd):/repo \
  -p 8000:8000 \
  ghcr.io/opendocument-app/odr_core_test \
  compare-html-server /repo/REFERENCE /repo/MONITORED --compare --driver firefox --port 8000

Manually build the docker image

docker build --tag odr_core_test test/docker

Run locally

PYTHONPATH=$(pwd)/src:$PYTHONPATH python ./src/htmlcmp/compare_output_server.py \
  /path/to/REFERENCE \
  /path/to/MONITORED \
  --compare \
  --driver firefox \
  --port 8000 \
  -vv

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

htmlcmp-2.2.0.tar.gz (19.2 kB view details)

Uploaded Source

File details

Details for the file htmlcmp-2.2.0.tar.gz.

File metadata

  • Download URL: htmlcmp-2.2.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for htmlcmp-2.2.0.tar.gz
Algorithm Hash digest
SHA256 ea1de2541d0f2d4b138d8d59c68f4f855308e8da3177dcaaabeded168066b3bf
MD5 7577d9a2e789003cc2bbf1be734b86c8
BLAKE2b-256 7e707f31360f27df98ac37489df35312ab9e529a5d773273aca231b630c585e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for htmlcmp-2.2.0.tar.gz:

Publisher: pypi.yaml on opendocument-app/compare-html

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page