Sample files for software development
General-purpose fixtures for building, debugging and demonstrating software that reads or writes files.
Any program that touches files needs example files during development: to try an idea, to reproduce a bug report, to write a unit test, or to show a feature to a colleague.
Having a consistent set to hand, with documented structure and exact sizes, removes a small but recurring obstacle. The same fictional records appear across CSV, JSON, XML, SQL and YAML, which also makes the set useful for building and checking converters.
Recommended files
| File | Size | Why this one | Download |
|---|---|---|---|
| Sample customers SQL script (100 rows)sample-customers.sql | 19.3 KB19,777 bytes | Seed data for a local database | Download SQL |
| Sample customers CSV (100 rows)sample-customers.csv | 7.83 KB8,018 bytes | Clean tabular input | Download CSV |
| 10 KB JSON samplesample-json-10kb.json | 10 KB10,240 bytes | Small structured fixture | Download JSON |
| 1 KB YAML samplesample-yaml-1kb.yaml | 1 KB1,024 bytes | Configuration fixture | Download YAML |
| 100 KB LOG samplesample-log-100kb.log | 100 KB102,400 bytes | Log processing input | Download LOG |
Checklist
Pick the smallest file that shows the behaviour
Small inputs make debugging faster and failing tests easier to read.
Keep fixtures with the code
Commit them under a fixtures folder so everyone on the team tests against the same bytes.
Seed a local database
Use a SQL sample to create a table with realistic rows in seconds.
Test both directions
If your program writes a format as well as reading it, read a sample, write it back out and compare.
Guides
- How to create test files of any size
Commands for Linux, macOS and Windows that produce a file of an exact byte count, and when to use each.
- Using sample files for API testing
Three ways APIs receive files, with curl and fetch examples and the assertions that matter.
- Building a QA test file kit
The files every tester should keep ready, organised into baseline, boundary and edge-case sets.
Related use cases
Frequently asked questions
- Is there a licence I need to include?
- No attribution or licence text is required. The sample files may be used, modified and redistributed freely.