WebDAV server protocol compliance test suite
Project description
webdav_tck
A Python port of the litmus WebDAV server protocol compliance test suite.
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
- โ 65 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
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: Advanced HTTP features (coming soon)
- ๐ง Large Files: 2GB+ file handling (coming soon)
Installation
From source
# Clone the repository
git clone https://github.com/fermigier/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://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 (โ Implemented - 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 (โ Implemented - 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 (โ Implemented - 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 (โ Implemented - 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
Coming Soon
- HTTP: HTTP protocol compliance (Expect: 100-continue, etc.)
- Large Files: Handling files >2GB
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)
โ โโโ 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: 65 tests implemented
| Suite | Tests | Status |
|---|---|---|
| basic | 11 | โ Complete |
| copymove | 7 | โ Complete |
| props | 11 | โ Complete |
| locks | 36 | โ Complete |
| http | 1 | ๐ง Planned |
| largefile | 2 | ๐ง Planned |
Progress: 65/68 tests (95.6%)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webdav_tck-2025.11.0.tar.gz.
File metadata
- Download URL: webdav_tck-2025.11.0.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5928b7ae21c4a3a56dbd4b42862f5da030f6b075af77b14f2797f76c8f336cae
|
|
| MD5 |
3869cde3c9e9957e6099d9c18ef65582
|
|
| BLAKE2b-256 |
c0edf4eee1f2a2ac51f3f82bcc44fdb482a0e6ca82971852062f5d96c427fb26
|
File details
Details for the file webdav_tck-2025.11.0-py3-none-any.whl.
File metadata
- Download URL: webdav_tck-2025.11.0-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c94f0ee89fcc54c154e252f7723b0216dce819469078bf4face9a5a708c1ca60
|
|
| MD5 |
2821a121418a75bd68edbbcfdbc1e1b0
|
|
| BLAKE2b-256 |
5b499a332ae06df7fdaea3233703fde8a5979a14c78c30e11db43df8a997b479
|