File Upload Testing

Manual Testing

// Definition

A testing discipline verifying that an application handles file uploads correctly across all dimensions: accepted types, size limits, malformed content, and security boundaries. A complete test strategy covers the happy path, boundary values (file exactly at and one byte over the size limit), type validation (correct extension with mismatched Content-Type MIME type; double extensions such as .php.jpg), empty files, zero-byte files, filenames with special characters, concurrent uploads, and interrupted uploads. Security-relevant tests include attempting to upload executable files to endpoints that serve user content, verifying that upload endpoints reject unauthenticated requests, and confirming stored files are served with Content-Disposition: attachment to prevent in-browser execution. Always test server-side validation independently from any client-side validation — client-side checks are easily bypassed.

// Related terms