Binary streams, partial downloads and system test stubs (BIN, CRDOWNLOAD, EXE, ISO)
Test raw binary upload handlers, byte-range resumable downloads, antivirus/firewall extension blockers, and disk-image signature checkers safely without hosting live executable code.
System and raw binary formats
Quality assurance teams regularly need to test how an upload form, API gateway, or cloud storage bucket reacts to untyped binary payloads (.bin), incomplete browser downloads (.crdownload), Windows executables (.exe), and optical disc images (.iso). However, hosting real executable binaries on a public website creates security risks and triggers automated browser Safe Browsing blocks.
SampleTestFiles solves both problems cleanly: we provide deterministic high-entropy BIN files in exact sizes from 1 KB to 1 GB, and we provide an in-browser Inert Stub Generator that synthesizes non-executable .exe (DOS MZ header + plain-text warning) and .iso (ECMA-119 CD001 primary volume descriptor at sector 16) files directly on your device.
| Format | MIME type | Signature bytes | Delivery & QA purpose | Action |
|---|---|---|---|---|
| BIN (Raw Binary) | application/octet-stream | Deterministic PRNG byte stream | Testing raw binary uploads, chunked transfers, and uncompressible bandwidth throughput from 1 KB to 1 GB | BIN samples |
| EXE (Inert MZ Stub) | application/x-msdownload | 4D 5A ('MZ') | Testing upload denylists and magic-byte blockers using an inert, non-executable DOS MZ stub built in your browser | Generate .exe stub |
| ISO (Inert ISO-9660 Stub) | application/x-iso9660-image | 01 43 44 30 30 31 ('\x01CD001' at 0x8000) | Testing optical disc image signature detection with a 64 KB inert ISO-9660 header stub built in your browser | Generate .iso stub |
| CRDOWNLOAD | application/octet-stream | Partial target file bytes | Simulating users accidentally selecting an unfinished Chrome download in a file picker | Broken-file suite |
How to test executable and binary upload filters safely
- Never use real malware or EICAR on shared staging environments: Uploading EICAR or live Windows PE binaries to shared cloud buckets can trigger automated account suspension by cloud providers. Instead, generate an inert
.exestub on /generator/: it begins with the exact two bytes (4D 5A, ASCIIMZ) that magic-byte validators check, followed immediately by an ASCII notice rather than executable machine instructions. - Verify high-entropy incompressible streams with BIN: Text and zero-filled files compress by 99% when HTTP gzip or Brotli is active, skewing upload and download speed measurements. Our BIN fixtures use a deterministic xorshift stream so network compression cannot artificially accelerate the transfer.
Frequently asked questions
- Why are .exe and .iso files generated in the browser instead of hosted as static downloads?
- Hosting downloadable .exe or .iso files on a public web server triggers Google Safe Browsing warnings and corporate firewall blocks. Building an inert header stub inside your browser gives you the exact 'MZ' or 'CD001' magic signature for upload-filter testing without risking security flags.
- How do I test a .crdownload upload rejection?
- Download any truncated fixture from /broken-files/ and rename its extension to .crdownload to verify that your frontend file input rejects incomplete browser downloads.
Engineering test checklist for binary streams, partial downloads and system test stubs (bin, crdownload, exe, iso)
When designing automated integration suites for other pipelines, QA engineers must validate three distinct layers: binary container framing, metadata extraction accuracy, and resource-bounded parsing under concurrent load.
| Verification layer | Target assertion for other | Recommended test fixture or tool |
|---|---|---|
| 1. Signature & MIME check | Confirm backend inspects leading magic bytes rather than trusting the client Content-Type header for other uploads | Magic-Byte File Inspector & Spoofed-Extension Fixtures |
| 2. Boundary byte sizes | Test minimum valid header size, 1 MB default proxy limit, 10 MB application ceiling, and 50 MB+ streaming transfers | Size Buckets (1 KB–1 GB) & In-Browser Generator |
| 3. Corrupt payload handling | Verify that truncated streams or malformed headers in other return HTTP 400/422 instead of crashing the worker | Broken-File QA Suite & errors-400.json |
| 4. Checksum reproducibility | Assert that round-trip storage in cloud object storage preserves the exact byte length and SHA-256 digest | SHA-256 Checksum Directory |
Common failure points in other ingestion workflows
- Buffering entire files in process memory: Node.js, Python, and Java services that read an entire uploaded other fixture into a contiguous heap buffer before checking its header signature risk Out-Of-Memory (OOM) terminations when concurrent users upload 20 MB to 100 MB files. Read the first 4,096 bytes from the stream to validate magic bytes before streaming the body to object storage.
- Character encoding and metadata sanitization: Filenames and embedded metadata fields inside other containers can contain precomposed (NFC) or decomposed (NFD) Unicode sequences, spaces, or missing extensions. Combine the format fixtures above with our edge-case filename samples and the A to Z Format Index to cover every parser branch.
- Cross-platform viewer and codec parity: A other file that opens on a developer's macOS laptop may fail inside a minimal Alpine or Debian Linux container if required shared libraries or font tables are absent. Test parser behavior inside your exact production container image during CI using the copy-ready recipes on CLI & CI Automation.