QA Testing6 min readSeptember 19, 2025

QA Tester: Test File Library for E-commerce Image Uploads

QA Tester: Test File Library for E-commerce Image Uploads

Scenario

Setting: Mid-size e-commerce platform (composite)
Industry: Online Retail

Challenge

Testing product image uploads across formats, sizes, resolutions and edge cases

This is a composite scenario based on common challenges in e-commerce QA work. It does not describe a specific company, and it contains no measured results.

The Scenario

A QA engineer at an online store is asked to test a new product image upload feature. Sellers upload photos from phones and cameras, the platform resizes them into thumbnails and zoom images, and the upload form has these rules:

  • Accepted formats: JPG, PNG and WebP
  • Maximum size: 10 MB per image
  • Minimum resolution: 500 × 500 pixels
  • Rejected: anything else, with a clear error message

The engineer needs files that hit each of these rules precisely. Real product photos are a poor fit: their sizes and resolutions are random, and they can't be shared freely in a test repository.

Step 1: Generate the Valid Files

The baseline set covers every accepted format at a realistic size. In FileMock's Image tab:

FileFormatResolutionTarget sizePurpose
valid-smallJPG640 × 6401 MBTypical phone upload
valid-mediumPNG1920 × 10805 MBTypical camera upload
valid-webpWebP720 × 7201 MBModern format support
valid-minimumJPG500 × 5001 MBExactly the resolution floor

Each of these should upload without errors and produce correct thumbnails.

Resolution and size go together. If an image at the chosen settings would be larger than the target size, FileMock lowers the quality and then the resolution until it fits, and shows the final resolution after the download. When a test depends on exact pixel dimensions, choose a target size that leaves room for them, as in the table above.

Step 2: Generate the Boundary Files

Boundaries are where upload bugs hide. These files sit just inside and just outside each rule:

  • Size limit: a JPG at 9.9 MB and one at 10.1 MB.
  • Resolution floor: a JPG at 499 × 499 and 1 MB (should be rejected) next to the 500 × 500 file from Step 1.
  • Extreme aspect ratios: a custom 4000 × 200 banner and a 200 × 4000 strip at 5 MB or more, to check how thumbnails are cropped.
  • Large dimensions: a 4K or 8K PNG of 5 MB or more, to check that resizing doesn't time out or exhaust memory.

Know your units. FileMock sizes are binary megabytes: 10 MB = 10 × 1,048,576 = 10,485,760 bytes. Your backend may define "10 MB" as 10,000,000 bytes. Check the byte count of every boundary file with wc -c < file.jpg and compare it with the limit in your code.

Step 3: Generate the Format Variations

Sellers upload more than the three accepted formats, so test the ones that should be rejected too:

  • TIFF: a large format used by scanners and print workflows. Generate it in FileMock's Image tab.
  • HEIC (the iPhone default): a common real-world surprise. Use a photo taken on an iPhone with default camera settings.
  • Animated images: generate an animated GIF or WebP in FileMock to check whether animated files are rejected or silently flattened.

For each one, the expected result is a clear "format not supported" message, not a generic server error.

Step 4: Derive the Broken Files

FileMock generates valid files. The invalid cases are easy to derive from them with standard commands:

# Empty file
: > empty.jpg

# Wrong content behind a valid extension (PNG bytes, .jpg name)
cp valid-medium.png mismatched.jpg

# Truncated file: first 4 KB of a valid JPG
head -c 4096 valid-small.jpg > truncated.jpg

# Not an image at all
echo "plain text" > not-an-image.jpg

These files test whether the upload checks the actual content, or only the file name.

Step 5: Test EXIF Orientation

Phone photos often store rotation in EXIF metadata instead of rotating the pixels. If the platform ignores it, product photos appear sideways.

Use the EXIF settings in the Image tab to generate JPG files with orientation values 1, 3, 6 and 8, plus camera make and model. Upload each one and check:

  • Thumbnails are displayed upright
  • EXIF data is stripped from public images if your privacy policy requires it

What to Check on Every Upload

CheckWhat a pass looks like
Accept / rejectMatches the rules exactly, including at the boundaries
Error messageTells the seller what is wrong and what is allowed
Server response4xx with a reason for invalid files, never a 500
Generated thumbnailsCorrect orientation, no distortion at extreme ratios
Upload progressVisible and accurate for the larger files
StorageRejected files are not left behind on disk or in a bucket

Organizing the Library

Keeping the files in one structured folder makes them reusable for regression testing:

test-files/images/ ├── valid/ # Step 1 ├── boundaries/ # Step 2 ├── formats/ # Step 3 ├── broken/ # Step 4 └── exif/ # Step 5

Name each file after what it tests (size-10.1mb-over-limit.jpg) so a failing test explains itself. Small files can be committed to the repository; large ones are better regenerated when needed.

Takeaways

  • Start from the upload rules and create one file per rule, on both sides of each boundary.
  • Check byte counts yourself: "10 MB" means different things in different systems.
  • Generate valid files with a tool, then derive the broken ones with simple commands.
  • Test formats your users will actually send, such as HEIC from iPhones, not only the ones you accept.

Generate the image files for this checklist with the FileMock image generator. Everything is created in your browser, so no files are uploaded anywhere.

Related Case Studies

Ready to Achieve Similar Results?

Transform your testing workflow like Mid-size e-commerce platform (composite). Generate comprehensive test files and build reliable applications with FileMock's powerful file generation capabilities.