This guide describes how to execute the RUFH (Resumable Uploads for HTTP) conformity tests against a locally running instance of the Spring Boot demo server or any RUFH compliant server endpoint.
The test suite validates compliance with draft-ietf-httpbis-resumable-upload-12 and RFC 9530 HTTP Digests.
First, compile and install the core tus-java-server library to your local Maven repository:
# In the root of the tus-java-server repository
mvn clean install -DskipTests-
Verify the dependency in
tus-java-server-spring-demoproject'sspring-boot-rest/pom.xmlpoints to the snapshot version:<dependency> <groupId>me.desair.tus</groupId> <artifactId>tus-java-server</artifactId> <version>2.0.0-SNAPSHOT</version> </dependency>
-
Build and start the Spring Boot REST demo server with a
1 KBmaximum upload size parameter (--tus.server.max-upload-size=1024) to enable full limit discovery & limit enforcement verification:cd ../tus-java-server-spring-demo mvn clean package -DskipTests java -jar spring-boot-rest/target/spring-boot-rest-0.0.1-SNAPSHOT.jar --tus.server.max-upload-size=1024The server will start on port
8080with the upload endpoint exposed at:http://localhost:8080/test/api/upload
The repository includes its own native Python conformity test suite located at scripts/rufh_conformity_test.py. It requires pytest and requests.
Install Python dependencies if not already installed:
pip install pytest requestsYou can execute the test suite using Python directly or via PyTest:
python3 scripts/rufh_conformity_test.py --url http://localhost:8080/test/api/uploadpytest scripts/rufh_conformity_test.py --url http://localhost:8080/test/api/uploadWhen executed, the script produces a structured summary report detailing:
- Total Tests Executed: Count of total specification compliance tests run.
- Passed Tests: Number of tests matching draft-12 specification requirements.
- Failed Tests: Detailed list of failing tests including test method names, exact error tracebacks, expected status codes/headers, and corresponding RFC section references.
- 104 Interim Responses: Count of tests where
HTTP/1.1 104 Upload Resumption Supportedinterim responses were detected from the server socket.
AI agents and developers can analyze the detailed failure breakdown in the script's console output to pinpoint specific compliance gaps and adjust server logic accordingly.
Alternatively, you can also run the external community test suite from the ietf-hackathon repository:
git clone https://github.com/tus/ietf-hackathon.git
cd ietf-hackathon/tests
pip install -r requirements.txt
pytest --url http://localhost:8080/test/api/upload