The Polyglot's Dilemma: Conformance Testing a Dozen Specs in as Many Languages
At MongoDB we implement the same protocols in many programming languages. How do we test that all the implementations match the specs?
Quick read
A blog post describing how MongoDB uses a Unified Test Format built on YAML to validate that native drivers in many languages conform to shared specs. It explains why the YAML-based tests let the team prove behavioral consistency across drivers and enforce spec changes.
- Shared YAML tests encode driver behaviors and edge cases
- RunOnRequirements and schemaVersion control test applicability
- Test runners map YAML operations to each driver’s API
Reactions
No reactions yet. Record a short about this link and it shows up here, in Reels and in the community feed.
Is emptysqua.re your site? Sign in to verify it and get a Verified badge, full stats and a link-back badge.
A closer look at The Polyglot's Dilemma: Conformance Testing a Dozen Specs in as Many Languages
Why MongoDB needed a shared test language
MongoDB implements client drivers natively in many programming languages, with most drivers rewritten in their target language rather than being thin wrappers. That created a challenge: ensure behaviors and APIs line up across languages while allowing language-appropriate idioms.
Early proposals like Cucumber were rejected; engineers wanted something different. The team settled on a custom test language built on YAML to specify and run the same tests against each driver implementation.
What the Unified Test Format (YAML tests) actually does
The project uses a Unified Test Format based on YAML to express driver conformance tests. Each YAML file describes schemaVersion, runOnRequirements, createEntities, initialData, operations, and expected outcomes.
Test runners for each driver interpret the YAML, map operations to the language-specific API (for example updateOne -> update_one in Python), and use an internal MongoClient to perform server-side actions like failPoint. JSON Schema validates the YAML syntax for its declared schemaVersion.
Who benefits and what issues it catches
Driver engineers working on different language implementations benefit: the same tests can prove consistent behavior, reveal hidden behaviors, and enforce spec changes across drivers.
The tests can exercise things ordinary integration tests can’t observe (for example forcing the server to close a connection with failPoint to test retry behavior), verify event sequences, and confirm final database state via outcome checks.
Questions people ask about The Polyglot's Dilemma: Conformance Testing a Dozen Specs in as Many Languages
- Can I see an example test file and how it maps to driver APIs?
- The page shows an example Unified Test Format file that uses fields like failPoint, updateOne, expectResult, waitForEvent, expectEvents, and outcome, and explains how runners translate those to each driver's API.
- How do test runners handle incompatible server deployments?
- YAML files include runOnRequirements so a test runner skips files unless the MongoDB server deployment matches the stated requirements.
- How is the YAML syntax kept consistent across versions?
- schemaVersion tells the test runner which features the file uses, and JSON Schema is used to check that each YAML test has the proper syntax for its version.
The Polyglot's Dilemma: Conformance Testing a Dozen Specs in as Many Languages was shared on NexURLs by Nexis on October 25, 2026, in Learning & Books. So far it has 1 like from members.
What we found on this site
- Built with
- Hugo
- Served through
- Netlify
- Home page answered in
- 199 ms
- Trackers
- Google Analytics
- Ads
- None found
- RSS feed
- No
- Set up for phones
- Yes
- Real-visitor speed
- Passes Core Web Vitals
- Popularity
- Top 200,000 domain (Cloudflare)
- Google safety check
- No threats found
- Domain registered
- 2013
- Domain renews
- February 2027
Checked October 25, 2026 from the site’s own code and public records. See how the rest of the web compares in the NexURLs Internet Report.
Featured in
Quick answers
What is The Polyglot's Dilemma?
The Polyglot's Dilemma (emptysqua.re): A blog post describing how MongoDB uses a Unified Test Format built on YAML to validate that native drivers in many languages conform to shared specs. It explains why the YAML-based tests let the team prove behavioral consistency across drivers and enforce spec changes.
Who shared The Polyglot's Dilemma on NexURLs?
It was shared by Nexis in October 2026. Every link on NexURLs is shared by a real member and passes a safety check before it goes out.
What do people think of The Polyglot's Dilemma?
On NexURLs it has 1 like from members so far. Read the discussion on this page, or add your own take.
What are some sites like The Polyglot's Dilemma?
Members found these close to it: The Wild West of Polyglot Docs Sites, Exercism, Omniglot. The full list is on this page under Sites like The Polyglot's Dilemma.
Sites like The Polyglot's Dilemma
- The Wild West of Polyglot Docs Sitestechnicalwriting.dev
This site discusses the challenges of creating polyglot documentation sites. It is useful for understanding strategies...
- Exercism: Learn Programming Languagesexercism.org
Exercism is a platform to learn and practice programming languages through coding exercises. Users can improve their...
- Omniglotomniglot.com
- JSONLintjsonlint.com
JSONLint is a free online editor that validates, formats, and beautifies JSON input. Visit to quickly detect JSON...
- We should be more ambitious with the software we builddanluu.com
An opinion piece arguing developers should attempt larger, more ambitious software projects now that tooling and...
- Consistency is not a localized propertyn-the-loop.com
This page discusses the challenges of achieving consistency in distributed systems. It highlights the importance of...
More Learning & Books finds
- Faded Pagefadedpage.com
- Duolingoduolingo.com
- HathiTrust Digital Libraryhathitrust.org
- Ableton Learning Musiclearningmusic.ableton.com
- musictheory.netmusictheory.net
- MDN Learn Web Developmentdeveloper.mozilla.org
Feeling lucky? Try the random website generator.
Where people went next
Nobody has added a next stop yet. Be the first.