๐ File Operations Lab
Practice file download and upload testing. Learn to handle CSV, JSON, PDF, ZIP files, Range headers for resume downloads, and chunked transfer encoding.
๐ฆ Available File Formats
CSV
Comma-separated values. Easy to parse, widely supported.
Content-Type: text/csvJSON
JavaScript Object Notation. Structured, nested data.
Content-Type: application/jsonPortable Document Format. Binary format, needs parsing library.
Content-Type: application/pdfZIP
Compressed archive. Contains multiple files.
Content-Type: application/zipLarge Binary
Supports Range headers for resume downloads.
Accept-Ranges: bytesStream
Chunked transfer encoding for unknown size.
Transfer-Encoding: chunkedโก Quick Test
Download CSV File
EASYDownload a CSV file and verify its Content-Type header and data structure. Learn to parse CSV and validate the content.
/api/v1/files/download?format=csv&rows=10&type=usersDownload JSON File
EASYDownload a JSON file and validate its structure using JSON Schema or manual assertions.
/api/v1/files/download?format=json&rows=5&type=productsDownload PDF Document
MEDIUMDownload a PDF file and verify its size, Content-Disposition header, and basic PDF structure.
/api/v1/files/download?format=pdf&rows=10Download ZIP Archive
MEDIUMDownload a ZIP archive containing multiple files. Extract and verify the contents.
/api/v1/files/download?format=zipRange Request (Resume Download)
HARDImplement partial file download using Range headers. This enables resume functionality for interrupted downloads.
/api/v1/files/download?format=large&size=1Streaming Download
HARDHandle large file downloads with streaming. Monitor progress and handle backpressure.
/api/v1/files/download?format=large&size=5Content-Disposition Header
MEDIUMTest Content-Disposition header parsing. Verify filename extraction including special characters and encoding.
/api/v1/files/download?format=csvChunked Transfer Encoding
EXPERTHandle Transfer-Encoding: chunked responses where Content-Length is not known in advance.
/api/v1/files/download?format=stream๐ป Quick Start
curl
# Download CSV
curl -O https://api.qa-practice.dev/api/v1/files/download?format=csv
# Resume download with Range
curl -C - -O https://api.qa-practice.dev/api/v1/files/download?format=large&size=5Playwright
// Download file
const [download] = await Promise.all([
page.waitForEvent('download'),
page.click('#download-btn'),
]);
const path = await download.path();