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

FileSizeWhy this oneDownload
Sample customers SQL script (100 rows)sample-customers.sql19.3 KB19,777 bytesSeed data for a local databaseDownload SQL
Sample customers CSV (100 rows)sample-customers.csv7.83 KB8,018 bytesClean tabular inputDownload CSV
10 KB JSON samplesample-json-10kb.json10 KB10,240 bytesSmall structured fixtureDownload JSON
1 KB YAML samplesample-yaml-1kb.yaml1 KB1,024 bytesConfiguration fixtureDownload YAML
100 KB LOG samplesample-log-100kb.log100 KB102,400 bytesLog processing inputDownload LOG

Checklist

  1. Pick the smallest file that shows the behaviour

    Small inputs make debugging faster and failing tests easier to read.

  2. Keep fixtures with the code

    Commit them under a fixtures folder so everyone on the team tests against the same bytes.

  3. Seed a local database

    Use a SQL sample to create a table with realistic rows in seconds.

  4. Test both directions

    If your program writes a format as well as reading it, read a sample, write it back out and compare.

Guides

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.