Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions backend/tests/test_gen_content_pages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
"""Tests for scripts/gen-content-pages.py DTC coverage.

The generator widened from a curated 13-code set to one page per grounded
code in November 2026. These tests pin the coverage contract: every code
with grounded data (dim01 research seed or a community opinions file) gets
a page, no ungrounded code sneaks in, and the index groups every code
exactly once. They import the script as a module without running main().
"""

from __future__ import annotations

import importlib.util
from pathlib import Path

import pytest

REPO_ROOT = Path(__file__).resolve().parents[2]
SCRIPT_PATH = REPO_ROOT / "scripts" / "gen-content-pages.py"


@pytest.fixture(scope="module")
def gen():
"""Load scripts/gen-content-pages.py as a module (main() not executed)."""
spec = importlib.util.spec_from_file_location("gen_content_pages", SCRIPT_PATH)
assert spec is not None and spec.loader is not None
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod) # type: ignore[union-attr]
return mod


@pytest.fixture(scope="module")
def index(gen):
return gen.build_dtc_index()


def test_every_grounded_code_gets_a_page(gen, index):
featured, _ = index
grounded = set(gen.load_dim01()) | set(gen.load_opinions())
missing = grounded - set(featured)
assert not missing, f"grounded codes without a page: {sorted(missing)}"


def test_no_ungrounded_code_sneaks_in(gen, index):
featured, _ = index
allowed = (
set(gen.load_dim01())
| set(gen.load_opinions())
| set(gen.load_sae())
| set(gen.load_dtc_texts())
)
unknown = [c for c in featured if c not in allowed]
assert not unknown, f"page generated for code with no data source: {unknown}"


def test_every_featured_code_has_title_and_severity(index):
featured, catalog = index
assert featured, "expected a non-empty catalogue"
for code in featured:
entry = catalog[code]
assert entry["title"], f"{code}: missing title"
assert entry["severity"], f"{code}: missing severity"
assert entry["section"], f"{code}: missing section"


def test_index_page_lists_every_code_exactly_once(gen, index):
featured, catalog = index
html = gen.build_dtc_index_page(featured, catalog)
with_opinions = [c for c in featured if catalog[c]["opinions"]]
for code in featured:
occurrences = html.count(f"/dtc/{code}.html")
# Each code appears once in its system group; codes with opinions
# also appear in the featured strip.
expected = 2 if code in with_opinions else 1
assert occurrences == expected, (
f"{code}: expected {expected} index links, found {occurrences}"
)


def test_page_escapes_content_and_names_sources(gen, index):
featured, catalog = index
code = next(c for c in featured if catalog[c]["source_url"])
html = gen.build_dtc_page(code, catalog[code], gen.load_cross_links())
assert catalog[code]["source_url"] in html
assert "<script" not in html.lower() or "application/ld+json" in html
2 changes: 1 addition & 1 deletion docs/product_calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ maintainer cuts next; no version-surface work this month.
|---|---|---|
| Jan 4 – 10 | Update 3: wire evidence records into the profile `[needs verification]` markers; unverified coverage stays explicit | Every marker in `community/profiles/*.toml` maps to an evidence record or a named gap |
| Jan 11 – 17 | Update 3: validation-pack templates per chassis family (E9x N52/N54, E70 N62, F/G B58/N55) | A new owner can run a pack cold from the doc alone |
| Jan 18 – 24 | Supporting beat: `/dtc/` and `/engines/<engine>.html` static generator from `community/dtc_texts.toml` + profiles (closes the 28 broken public-site links) | Pages build fails on a missing asset; zero broken internal links on the sweep |
| Jan 18 – 24 | Supporting beat: fault-code content depth. The generator + all 220 grounded code pages shipped Nov 2026 (PR #355 closed the link backlog; the Nov expansion widened 13 → 220 pages); what is thin now is repair-path depth — 6 of 220 codes have community opinions files, 10 have schematic cross-links | Opinions coverage doubles; every new opinions file carries a source URL |
| Jan 25 – 31 | Buffer / Tier B review window for anything update 2 or 3 surfaced | — |

**Release candidate:** end of January, if update 2 is closed and the site
Expand Down
4 changes: 2 additions & 2 deletions frontend/bmw-enet-doip-diagnostics.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="initial-scale=1"><title>BMW ENET / DoIP diagnostics — F- and G-series guide | Beemuu</title><meta name="description" content="How BMW ENET / DoIP diagnostics work, which F- and G-series cars use it, and how BeeEmUu reads fault memory and live data over Ethernet."><meta name="robots" content="index, follow, max-image-preview:large"><meta property="og:type" content="article"><meta property="og:site_name" content="Beemuu"><meta property="og:title" content="BMW ENET / DoIP diagnostics — F- and G-series guide"><meta property="og:description" content="How BMW ENET / DoIP diagnostics work, which F- and G-series cars use it, and how BeeEmUu reads fault memory and live data over Ethernet."><meta property="og:url" content="https://beemuu.com/bmw-enet-doip-diagnostics.html"><meta property="og:image" content="https://beemuu.com/og-image-service.png"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:image" content="https://beemuu.com/og-image-service.png"><link rel="canonical" href="https://beemuu.com/bmw-enet-doip-diagnostics.html"><link rel="stylesheet" href="/guide.css"><script type="application/ld+json">
{"@context": "https://schema.org", "@type": "TechArticle", "headline": "BMW ENET / DoIP diagnostics — F- and G-series guide", "description": "How BMW ENET / DoIP diagnostics work, which F- and G-series cars use it, and how BeeEmUu reads fault memory and live data over Ethernet.", "url": "https://beemuu.com/bmw-enet-doip-diagnostics.html", "datePublished": "2026-10-11", "dateModified": "2026-10-11", "author": {"@type": "Organization", "name": "Beemuu contributors", "url": "https://beemuu.com/"}, "publisher": {"@type": "Organization", "name": "Beemuu contributors"}, "mainEntityOfPage": "https://beemuu.com/bmw-enet-doip-diagnostics.html"}
{"@context": "https://schema.org", "@type": "TechArticle", "headline": "BMW ENET / DoIP diagnostics — F- and G-series guide", "description": "How BMW ENET / DoIP diagnostics work, which F- and G-series cars use it, and how BeeEmUu reads fault memory and live data over Ethernet.", "url": "https://beemuu.com/bmw-enet-doip-diagnostics.html", "datePublished": "2026-11-27", "dateModified": "2026-11-27", "author": {"@type": "Organization", "name": "Beemuu contributors", "url": "https://beemuu.com/"}, "publisher": {"@type": "Organization", "name": "Beemuu contributors"}, "mainEntityOfPage": "https://beemuu.com/bmw-enet-doip-diagnostics.html"}
</script><script type="application/ld+json">
{"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Beemuu", "item": "https://beemuu.com/"}, {"@type": "ListItem", "position": 2, "name": "BMW ENET / DoIP diagnostics.", "item": "https://beemuu.com/bmw-enet-doip-diagnostics.html"}]}
</script></head><body><a class="skip-link" href="#main">Skip to content</a><header class="site-header"><a class="brand" href="/"><span class="brand-mark">B</span>BEEMUU</a><nav><a href="/hardware.html">K+DCAN</a><a href="/protocols.html">ENET</a><a href="/tools/known-codes.html">Fault codes</a><a href="https://github.com/ohgeeceee/beemuu">GitHub</a></nav></header><main id="main"><section class="guide-hero"><p class="breadcrumbs"><a href="/">Beemuu</a> / <a href="/bmw-enet-doip-diagnostics.html" aria-current="page">BMW ENET / DoIP diagnostics.</a></p><p class="eyebrow">Diagnostics guide</p><h1>BMW ENET / DoIP diagnostics.</h1><p class="lede">How BeeEmUu talks to F- and G-series BMWs over ENET (DoIP over Ethernet).</p><div class="guide-meta"><span>Guide</span><span>Updated October 2026</span><span>GPL-3.0</span></div></section><div class="guide-layout"><aside class="toc"><strong>On this page</strong><a href="#what">What ENET / DoIP is</a><a href="#cars">Which cars use it</a><a href="#scan">What you can read</a></aside><article class="article"><h2 id="what">What ENET / DoIP is</h2><p>ENET is BMW's Ethernet diagnostic interface. The modules speak DoIP (Diagnostics over IP), the same UDS services wrapped in an IP transport instead of a serial line.</p><p>Vehicle discovery, addressing and the DME pinout are on the <a href="/protocols.html">protocols guide</a>.</p><h2 id="cars">Which cars use it</h2><ul><li>F20 / F30 / F31 (1 and 3 Series)</li><li>F10 (5 Series)</li><li>F15 / F16 (X5 / X6)</li><li>G20 / G30 and later</li></ul><p>Older E-series cars use <a href="/bmw-k-dcan-diagnostics.html">K+DCAN</a>.</p><h2 id="scan">What you can read</h2><p>The same fault memory and live-data surface as K+DCAN, over a faster link. See the <a href="/engines.html">engine profiles</a> and the <a href="/dtc/">fault-code index</a>.</p></article></div><section class="related"><h2>Continue learning</h2><div class="related-grid"><a href="/protocols.html"><strong>Protocols guide</strong><span>DoIP and UDS.</span></a><a href="/bmw-k-dcan-diagnostics.html"><strong>K+DCAN</strong><span>E-series.</span></a><a href="/dtc/"><strong>Fault codes</strong><span>The code index.</span></a></div></section><section class="cta"><h2>Read the data, not the guess.</h2><p>BeeEmUu reads your BMW&#x27;s modules directly — free and offline.</p><a class="button" href="/tools/dtc-decoder.html">Open the DTC decoder</a><a class="button secondary" href="https://github.com/ohgeeceee/beemuu">GitHub</a></section><nav class="related-guides" aria-label="Related guides"><h2>Related guides</h2><ul><li><a href="/hardware.html">BMW K+DCAN diagnostics</a></li><li><a href="/protocols.html">BMW ENET / DoIP diagnostics</a></li><li><a href="/tools/known-codes.html">BMW fault codes</a></li><li><a href="/protocols.html">BMW VIN decoding</a></li><li><a href="/glossary.html">Glossary</a></li><li><a href="/roadmap/index.html">Roadmap</a></li></ul></nav><p class="last-updated"><small>Last updated: 2026-10-11 · Beemuu contributors</small></p></main><footer><div><a class="brand" href="/"><span class="brand-mark">B</span>BEEMUU</a><p>Independent, free and open-source BMW diagnostic software. Not affiliated with BMW AG.</p></div><nav><a href="/">Home</a><a href="/schematics.html">Schematics</a><a href="/index.html#status">Status</a><a href="https://github.com/ohgeeceee/beemuu">GitHub</a></nav></footer></body></html>
</script></head><body><a class="skip-link" href="#main">Skip to content</a><header class="site-header"><a class="brand" href="/"><span class="brand-mark">B</span>BEEMUU</a><nav><a href="/hardware.html">K+DCAN</a><a href="/protocols.html">ENET</a><a href="/tools/known-codes.html">Fault codes</a><a href="https://github.com/ohgeeceee/beemuu">GitHub</a></nav></header><main id="main"><section class="guide-hero"><p class="breadcrumbs"><a href="/">Beemuu</a> / <a href="/bmw-enet-doip-diagnostics.html" aria-current="page">BMW ENET / DoIP diagnostics.</a></p><p class="eyebrow">Diagnostics guide</p><h1>BMW ENET / DoIP diagnostics.</h1><p class="lede">How BeeEmUu talks to F- and G-series BMWs over ENET (DoIP over Ethernet).</p><div class="guide-meta"><span>Guide</span><span>Updated November 2026</span><span>GPL-3.0</span></div></section><div class="guide-layout"><aside class="toc"><strong>On this page</strong><a href="#what">What ENET / DoIP is</a><a href="#cars">Which cars use it</a><a href="#scan">What you can read</a></aside><article class="article"><h2 id="what">What ENET / DoIP is</h2><p>ENET is BMW's Ethernet diagnostic interface. The modules speak DoIP (Diagnostics over IP), the same UDS services wrapped in an IP transport instead of a serial line.</p><p>Vehicle discovery, addressing and the DME pinout are on the <a href="/protocols.html">protocols guide</a>.</p><h2 id="cars">Which cars use it</h2><ul><li>F20 / F30 / F31 (1 and 3 Series)</li><li>F10 (5 Series)</li><li>F15 / F16 (X5 / X6)</li><li>G20 / G30 and later</li></ul><p>Older E-series cars use <a href="/bmw-k-dcan-diagnostics.html">K+DCAN</a>.</p><h2 id="scan">What you can read</h2><p>The same fault memory and live-data surface as K+DCAN, over a faster link. See the <a href="/engines.html">engine profiles</a> and the <a href="/dtc/">fault-code index</a>.</p></article></div><section class="related"><h2>Continue learning</h2><div class="related-grid"><a href="/protocols.html"><strong>Protocols guide</strong><span>DoIP and UDS.</span></a><a href="/bmw-k-dcan-diagnostics.html"><strong>K+DCAN</strong><span>E-series.</span></a><a href="/dtc/"><strong>Fault codes</strong><span>The code index.</span></a></div></section><section class="cta"><h2>Read the data, not the guess.</h2><p>BeeEmUu reads your BMW&#x27;s modules directly — free and offline.</p><a class="button" href="/tools/dtc-decoder.html">Open the DTC decoder</a><a class="button secondary" href="https://github.com/ohgeeceee/beemuu">GitHub</a></section><nav class="related-guides" aria-label="Related guides"><h2>Related guides</h2><ul><li><a href="/hardware.html">BMW K+DCAN diagnostics</a></li><li><a href="/protocols.html">BMW ENET / DoIP diagnostics</a></li><li><a href="/tools/known-codes.html">BMW fault codes</a></li><li><a href="/protocols.html">BMW VIN decoding</a></li><li><a href="/glossary.html">Glossary</a></li><li><a href="/roadmap/index.html">Roadmap</a></li></ul></nav><p class="last-updated"><small>Last updated: 2026-11-27 · Beemuu contributors</small></p></main><footer><div><a class="brand" href="/"><span class="brand-mark">B</span>BEEMUU</a><p>Independent, free and open-source BMW diagnostic software. Not affiliated with BMW AG.</p></div><nav><a href="/">Home</a><a href="/schematics.html">Schematics</a><a href="/index.html#status">Status</a><a href="https://github.com/ohgeeceee/beemuu">GitHub</a></nav></footer></body></html>
Loading
Loading