Skip to main content

WebDAV server protocol compliance test suite

Project description

WebDAV TCK

A Python port of the litmus WebDAV server protocol compliance test suite.

Python Version License Tests Complete

Overview

webdav-tck is a WebDAV server protocol compliance test suite that validates server implementations against RFC 4918 (HTTP Extensions for Web Distributed Authoring and Versioning). This is a modern Python rewrite of the original C-based litmus test suite with async/await support and comprehensive test coverage.

Key Highlights:

  • ๐Ÿš€ Modern async Python implementation
  • โœ… 68 tests covering WebDAV Class 1 & 2 operations
  • ๐ŸŽจ Rich colored terminal output
  • ๐Ÿ“Š Detailed test reporting and debug logging
  • ๐Ÿ”’ Full locking support (exclusive/shared, conditional requests)
  • ๐ŸŒ UTF-8 and Unicode support
  • ๐Ÿ“ Large file handling (>2GB) support

Features

  • โœ… Basic Operations: OPTIONS, PUT, GET, MKCOL, DELETE
  • โœ… COPY/MOVE: Resource and collection operations with Depth and Overwrite headers
  • โœ… Properties: PROPFIND, PROPPATCH with custom and live properties
  • โœ… Locking: WebDAV Class 2 locking (exclusive/shared, conditional requests)
  • โœ… HTTP Protocol: Expect: 100-continue header handling
  • โœ… Large Files: 2GB+ file handling with streaming support

Installation

From source

# Clone the repository
git clone https://github.com/abilian/webdav-tck.git
cd webdav-tck

# Install dependencies
uv sync

From PyPI (coming soon)

pip install webdav-tck

Usage

Command Line

# Basic usage
dav-tck http://localhost/webdav/

# With authentication
dav-tck http://localhost/webdav/ username password

# With HTTPS (ignore certificate errors)
dav-tck --insecure https://localhost/webdav/

# Quiet mode
dav-tck --quiet http://localhost/webdav/

# Run specific test suites
dav-tck --suites=basic,copymove,props,locks,http,largefile http://localhost/webdav/

# Use proxy
dav-tck --proxy=http://proxy.example.com:8080 http://localhost/webdav/

Note: The command is available as both dav-tck and litmus after installation.

Options

  • --proxy, -p URL: Use specified HTTP proxy
  • --system-proxy, -s: Use system proxy configuration
  • --client-cert, -c FILE: Use PKCS#12 client certificate
  • --insecure, -i: Ignore TLS certificate verification failures
  • --quiet, -q: Use abbreviated output format
  • --colour/--no-colour: Force color output on/off (default: auto-detect)
  • --suites LIST: Comma-separated list of test suites to run

Test Suites

Basic (11 tests)

Tests fundamental HTTP and WebDAV operations:

  • OPTIONS request and DAV header checking
  • PUT/GET with byte-for-byte comparison
  • UTF-8 characters in URIs
  • MKCOL (create collection)
  • DELETE (resources and collections)
  • Error handling (409, 404, 415 status codes)

COPY/MOVE (7 tests)

Tests resource and collection operations:

  • Simple COPY operations
  • Overwrite behavior (Overwrite: T/F headers)
  • Copying into non-existent collections (409 responses)
  • Recursive collection copying (Depth: infinity)
  • Shallow collection copying (Depth: 0)
  • MOVE operations with lock handling
  • Collection moves with members

Properties (11 tests)

Tests property manipulation:

  • PROPFIND with various depths
  • Invalid XML handling (400 responses)
  • Setting custom properties via PROPPATCH
  • Property persistence across MOVE
  • Deleting and replacing properties
  • Null namespace properties
  • High Unicode character support (U+10000)
  • Well-formed XML validation
  • Live properties (getlastmodified)

Locks (36 tests)

Tests WebDAV Class 2 locking:

  • Exclusive and shared locks
  • Lock discovery via PROPFIND
  • Lock refresh operations
  • Owner vs non-owner access control
  • Lock token management
  • Conditional PUT with If: headers
  • Complex conditional requests (lock token + ETag)
  • Collection locking (Depth: infinity)
  • Indirect lock refresh via collection members
  • Lock-null resources (LOCK on unmapped URLs)
  • Locks don't follow COPY operations

HTTP (1 test)

Tests HTTP protocol compliance:

  • Expect: 100-continue header handling
  • Raw socket communication for protocol testing
  • Interim response validation

Large Files (2 tests)

Tests handling of files larger than 2GB:

  • Streaming PUT for large files (2GB+)
  • Streaming GET with content verification
  • 64-bit offset support verification
  • Memory-efficient chunked transfers

Development

Setup

# Install development dependencies
uv sync

# Run tests
uv run pytest

# Type checking
uv run mypy src/
uv run pyrefly src/

# Linting and formatting
uv run ruff check src/ tests/
uv run ruff format src/ tests/

Project Structure

webdav_tck/
โ”œโ”€โ”€ src/webdav_tck/      # Main package
โ”‚   โ”œโ”€โ”€ framework/       # Test framework
โ”‚   โ”‚   โ”œโ”€โ”€ result.py    # Result types
โ”‚   โ”‚   โ”œโ”€โ”€ runner.py    # Test runner
โ”‚   โ”‚   โ””โ”€โ”€ suite.py     # Suite management
โ”‚   โ”œโ”€โ”€ suites/          # Test suites
โ”‚   โ”‚   โ”œโ”€โ”€ basic.py     # Basic operations (11 tests)
โ”‚   โ”‚   โ”œโ”€โ”€ copymove.py  # COPY/MOVE (7 tests)
โ”‚   โ”‚   โ”œโ”€โ”€ props.py     # Properties (11 tests)
โ”‚   โ”‚   โ”œโ”€โ”€ locks.py     # Locking (36 tests)
โ”‚   โ”‚   โ”œโ”€โ”€ http.py      # HTTP protocol (1 test)
โ”‚   โ”‚   โ””โ”€โ”€ largefile.py # Large files (2 tests)
โ”‚   โ”œโ”€โ”€ client.py        # WebDAV HTTP client
โ”‚   โ”œโ”€โ”€ session.py       # Session management
โ”‚   โ”œโ”€โ”€ xml_utils.py     # XML builders/parsers
โ”‚   โ””โ”€โ”€ __main__.py      # CLI entry point
โ”œโ”€โ”€ tests/               # Unit tests
โ”‚   โ””โ”€โ”€ test_framework.py
โ””โ”€โ”€ pyproject.toml       # Project configuration

Requirements

  • Python 3.10+
  • httpx (async HTTP client)
  • lxml (XML processing)
  • click (CLI interface)
  • rich (colored output)

Implementation Status

Total: 68 tests implemented (100% complete!)

Suite Tests Status
basic 11 โœ… Complete
copymove 7 โœ… Complete
props 11 โœ… Complete
locks 36 โœ… Complete
http 1 โœ… Complete
largefile 2 โœ… Complete

Progress: 68/68 tests (100%)

License

GNU General Public License v2.0 or later (GPL-2.0-or-later)

This maintains compatibility with the original litmus project.

Credits

  • Original litmus: Copyright (C) 1999-2025 Joe Orton
  • Python port: Copyright (C) 2025 Abilian SAS and contributors

Contributing

Contributions are welcome!

References

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

webdav_tck-2026.1.1.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webdav_tck-2026.1.1-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

File details

Details for the file webdav_tck-2026.1.1.tar.gz.

File metadata

  • Download URL: webdav_tck-2026.1.1.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for webdav_tck-2026.1.1.tar.gz
Algorithm Hash digest
SHA256 f5b3d6b5db72d9fa568ed5500c51efcc642e4835a868ec8363158ef7a5ba2365
MD5 63fab7a55c85784c09bcbc9fb51dcee5
BLAKE2b-256 0d9ea17c109813bf4c0396f16bd7e4f2c9709cc23befbca7ce2a926a91ec2871

See more details on using hashes here.

File details

Details for the file webdav_tck-2026.1.1-py3-none-any.whl.

File metadata

  • Download URL: webdav_tck-2026.1.1-py3-none-any.whl
  • Upload date:
  • Size: 35.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for webdav_tck-2026.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5a541c1e2ee02d6653e91b1e2892c4e6b27a37d88f1b7378213141346a2f817
MD5 821c205400b180c64cd6612d6c8bffaa
BLAKE2b-256 2e6a809b13a9cf9b03a272439401b2529d271a0a39cbc34061e695bc6e16dab6

See more details on using hashes here.

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