Skip to content

YAML · 5 files

YAML sample files - free download

Download verified YAML test files with indentation hierarchies, multi-document streams (---), anchors (&) and aliases (*). Ideal for testing Kubernetes kubectl validation, Docker Compose, OpenAPI linters, and CI/CD automation.

5 files YAML 1.1 KB - 712 KB Maps, sequences & anchors

YAML library

Available YAML samples

5 files

1.11 KB

Microservices & Database Config Map (1.11 KB)

Entries:4 Sections

YAML Download YAML

1.79 KB

Kubernetes Multi-Document Manifest (1.79 KB)

Entries:4 Manifests

YAML Download YAML

32.68 KB

50-Service Docker Compose Cluster (32.68 KB)

Entries:50 Services

YAML Download YAML

457.60 KB

OpenAPI 3.1.0 REST & Telemetry Specification (457.60 KB)

Entries:250 Endpoints

YAML Download YAML

712.08 KB

1,000-Job Enterprise CI/CD Pipeline Matrix (712.08 KB)

Entries:1,000 Jobs

YAML Download YAML

YAML testing guide

Test YAML parsers, Kubernetes manifests and CI/CD workflows with clean fixtures

YAML (YAML Ain't Markup Language) is a human-friendly data serialization language commonly used for configuration files. These fixtures provide clean indentation, valid anchor references, and multi-document streams for reliable testing.

What is inside each sample file?

Each download is a fully compliant YAML 1.2 document using standard 2-space indentation. Fixtures range from a simple microservice configuration to multi-document Kubernetes manifests, a 50-service Docker Compose cluster with merge keys, and large OpenAPI specifications and CI/CD matrices.

Choose the 1.1 KB config file for smoke testing parsers, the 32 KB Docker Compose file to test anchor reference resolution (& and *), or the 712 KB CI matrix for benchmarking parser memory and execution speed.

Before using a YAML fixture

  • ✓ Ensure your editor or parser treats indentation with spaces only (tabs are forbidden in YAML).
  • ✓ Verify your parser implements YAML 1.2 Core Schema to avoid the "Norway problem" (no/yes as booleans).
  • ✓ Use direct download URLs in automated testing pipelines and validation scripts.

Frequently asked questions

What is a YAML file and why is it used for configuration?

A YAML file is a readable plain-text document designed for data serialization. Its clean whitespace indentation and minimal syntax make it the industry standard for cloud infrastructure tools like Kubernetes, Docker Compose, Ansible, and GitHub Actions.

Can I use tabs for indentation in these YAML files?

No. The official YAML specification strictly prohibits tab characters for indentation. All sample files on TestingFile use standard 2-space indentation to ensure universal parser compatibility.

What are YAML anchors and aliases?

Anchors (marked with &) and aliases (marked with *) allow developers to define a configuration block once and reuse it across multiple sections without duplicating text. Merge keys (<<:) allow overriding or extending anchored properties.

What is the difference between YAML 1.1 and YAML 1.2?

YAML 1.1 treated unquoted words like "yes", "no", "on", "off", "y", and "n" as booleans, leading to errors (such as country code "NO" for Norway being parsed as false). YAML 1.2 resolves this by adopting JSON-compatible boolean rules (only "true" and "false").

YAML format details

Extension

.yaml, .yml

MIME type

application/yaml

Encoding

UTF-8 (YAML 1.2)

Technical overview of YAML syntax & parser architecture

Evaluate whitespace rules, anchor resolution, multi-document streams, and schema compatibility across YAML implementations.

YAML 1.2 Core Schema & The Norway Problem

YAML 1.2 aligns its scalar resolution rules directly with JSON, resolving legacy ambiguities in YAML 1.1 where unquoted strings like "yes", "no", or country codes like "NO" were automatically coerced into boolean values.

Anchors, Aliases & Graph Serialization

Unlike JSON, YAML supports full directed graph serialization through node anchors (&anchor) and alias references (*anchor). Parsers must maintain node identity tables during deserialization to resolve cyclic references safely.

Multi-Document Streaming with Triple-Dash (---)

The triple-dash delimiter allows multiple distinct YAML documents to exist within a single byte stream. Streaming parsers can yield documents incrementally without buffering the entire multi-megabyte payload into system memory.