New card-based home page - #1246
OsirisTerje wants to merge 9 commits into
Conversation
Revisits the idea from #1026 with a task-oriented, card-based home page (home.md) that lives next to the classic index.md. Readers can switch between the two; the choice is remembered per browser. No existing documents are moved, so all current URLs keep working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The landing page now follows the nine cards proposed in #1026, written from the user's point of view: Writing tests (featured), Getting started, News, Run anywhere, NUnit Tech, Articles, Developer info, Advanced and Archive. Contributor material is collected under Developer info. Ports the Writing tests guide pages from #1026 into the existing articles/nunit/writing-tests folder instead of a new folder structure: Ordinary tests, Data driven tests and Automating tests (the last one was empty in #1026 and is new). Code samples live in the tested snippets project. The Writing Tests menu entry now opens the Ordinary tests guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Previewing the new home pagePRs no longer get a Netlify preview (it was removed in #1063). Each CI run does attach the built site as the 1. Download the artifact
2. Unzip it (it is a zip inside a zip)The artifact contains # macOS / Linux / Git Bash
unzip siteArtifact.zip # skip if gh run download already extracted it, which it is most likely to do
unzip _site.zip# PowerShell
Expand-Archive siteArtifact.zip -DestinationPath . # skip if gh run download already extracted it
Expand-Archive _site.zip -DestinationPath .3. Serve itServe the folder over HTTP. Opening the files straight from disk breaks search and some scripts. Any static server works, for example: cd docs/_site
python -m http.server 8080
# or: npx serve -l 8080
# or: docfx serve .4. Open the pages
Alternatively, build it yourself: run |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The preview links need corrected .html URLs, and the documented wording issues should be addressed.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds a preview card-based NUnit landing page, beginner writing-test guides, and compilable examples while retaining the classic homepage.
Changes:
- Adds the responsive preview homepage and layout switching.
- Adds Ordinary, Data-driven, and Automating Tests guides.
- Updates navigation and homepage links.
| File | Summary |
|---|---|
docs/styles/main.js |
Adds persistent homepage layout switching. |
docs/snippets/Snippets.NUnit/WritingTestsGuideExamples.cs |
Adds compilable guide examples. |
docs/index.md |
Adds a preview link; moderate issue: use home.html instead of home.md. |
docs/home.md |
Adds the card-based landing page; moderate issue: convert internal .md links to .html. |
docs/custom_template/styles/main.css |
Adds scoped landing-page styling. |
docs/articles/nunit/writing-tests/toc.yml |
Updates writing-tests navigation. |
docs/articles/nunit/writing-tests/ordinary-tests.md |
Adds the ordinary-tests guide; nit regarding overly restrictive public-visibility wording. |
docs/articles/nunit/writing-tests/data-driven-tests.md |
Adds the data-driven-tests guide. |
docs/articles/nunit/writing-tests/automating-tests.md |
Adds the automating-tests guide; nit to qualify Pairwise “just enough” wording. |
docs/articles/nunit/toc.yml |
Updates the NUnit section navigation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- News links the release notes of every component, starting with what's new in NUnit 5; the NUnit Analyzers and the console/engine link to their GitHub release notes. - Getting started lists each way to start: Visual Studio, VS Code, Rider, the command line or an existing project, plus upgrading to NUnit 5. - The NUnit Analyzers are part of the message, the popular topics and the writing-tests reference. - Breaking changes up to 4.0, the NUnit 4 migration guide and the old upgrade guide move to the Archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ners - New page for the console and engine release notes, pointing to the GitHub releases, which have the notes from 3.18.0 on. The notes up to 3.17 stay at their URL but are only linked from the new page. - The home page News card links the new page. - The Xamarin runners (archived on GitHub in 2022) move from Run anywhere to the Archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan: placing the remaining documentation on the new landing pageThis plan covers the pages in the old navigation (the left-hand menu under Articles and the classic home page) that No documents are moved. Every suggestion is a link from the landing page, a link from another page, or an entry in the Ground rules
Worth lifting upGoing through the old menus turned up several topics that answer common user questions, but that today are only
The new guides would follow the pattern of Ordinary tests, Data driven tests and Automating tests: a short Already reachable, no change neededThese are not on the landing page, but a page that is on it lists them, so readers find them in one click.
Suggested placementsWriting tests card
Getting started card
Run anywhere card
NUnit Tech card
Articles card
Advanced card
Developer info card
Archive
Pages that need a decision
Suggested order of work
|
Implements the decision-free parts of the plan posted on #1246. - Three new user guides under Writing Tests, with tested snippets: tests that depend on other tests, flaky and slow tests, and organizing and selecting tests. - Landing page cards link Microsoft.Testing.Platform, .runsettings, multiple asserts, assumptions, warnings, TestContext, supported .NET versions, known problems, execution hooks, specifications, NUnit internals and a new Packaging index. The Articles link to the adapter debugging page is relabelled "Troubleshooting the test adapter". - New Archive page and a single Archive menu section. Deprecated and historical pages move there from their menus; no files are moved. - Cross-links so each page is one click from a card. - NUnit license copyright line synced with the nunit repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erview - The new layout is now index.md; the previous home page moves to classic.md and is linked from the top menu as "Classic Home". The preview banner and the layout-switch script are removed. - The NUnit introduction states that the docs cover NUnit 3 and later, with NUnit 2 as a separate product in the Archive, and points to where to start. - The test adapter overview is rewritten for adapter 6: NUnit 3 to 5, VSTest and Microsoft.Testing.Platform, .NET Framework 4.6.2 and .NET 8 and later, and configuration with runsettings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A user guide covering [SetUp]/[TearDown], [OneTimeSetUp]/ [OneTimeTearDown] and [SetUpFixture]: what each is for, how to choose, the order everything runs in, what happens when setup fails, and how constructors, IDisposable and FixtureLifeCycle relate. Code samples are tested in the snippets project. Linked from the Writing tests card, the "Setup and cleanup" chip, the Writing Tests menu and the Ordinary tests guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stevenaw
left a comment
There was a problem hiding this comment.
So far so good on my end @OsirisTerje .
I like the new look, and the usage-based guidance docs and archival of older docs are both nice improvements
|
Quite a bit of work you've put in! 👏 Aiming to review it tonight in a few hours. |


Revisits the idea from #1026 (see discussion #1023). This is not just a new layout but a different way of presenting NUnit: organized around what users want to do, in their own words, with writing tests up front. Contributor and project material is gathered under Developer info.
This means we move from a NUnit technical perspective to a more user centric perspective.
The new home page (
docs/index.md)dotnet test, Microsoft.Testing.Platform, .runsettings, command line console, NUnitLite, choosing which tests to run, TestCentric GUINews, NUnit Tech and Articles only had placeholders in #1026. They are filled with existing pages here ; we have to adjust this as we go forward.
New user guides for writing tests
The three Writing tests guides from #1026 are ported into the existing
articles/nunit/writing-tests/folder, at the top of its menu:ordinary-tests.md: a first test, Arrange/Act/Assert,[SetUp]setup-and-teardown.md:[SetUp]/[TearDown],[OneTimeSetUp]/[OneTimeTearDown]and[SetUpFixture], when to use which, the order they run in, and what happens when setup failsdata-driven-tests.md:[TestCase],ExpectedResult,[TestCaseSource]/TestCaseData,[ValueSource], parameterized fixturesautomating-tests.md: letting NUnit generate cases with[Values],[Range],[Random],[Pairwise]/[Sequential], and theories. This page was empty in WIP: New layout #1026 and is new.All code samples live in
Snippets.NUnit/WritingTestsGuideExamples.cs, so they compile and run as tests. The Writing Tests menu entry now opens Ordinary tests instead of the attribute list.Archive and menu clean-up
A new Archive page (
articles/archive.md) and a single Archive section in the side menu collect the pages for older versions, deprecated features and tools that are no longer maintained. These pages are removed from their old menus but keep their URLs. See the plan in the PR comments for the full list.No documents were moved
#1026 copied about 250 files into new folders. Apart from the three guides above, those were copies of existing pages. Moving them would break URLs that are linked from Stack Overflow, blogs and every NUnit Analyzer diagnostic (
helpLinkUri). The landing page gives a user-oriented view over the existing structure instead.Switching to the new home page
The new layout is now
docs/index.md, so it is what readers see at the site root. The previous home page is kept asdocs/classic.mdand linked from the top menu as Classic Home, so it stays reachable while the new page settles. The preview banner and the layout-switch script from earlier commits are removed.Other page updates
articles/nunit/intro.md): rewritten. The docs cover NUnit 3 and later; NUnit 2 is a separate product, documented in the Archive.articles/vs-test-adapter/Index.md): rewritten for adapter 6: NUnit 3 to 5, VSTest and Microsoft.Testing.Platform, .NET Framework 4.6.2 and .NET 8 and later.About HTML in Markdown
The DocFX
defaulttemplate has no per-page layout hook, sohome.mdis one HTML block withMD033disabled for that file only. All styles are incustom_template/styles/main.css, scoped under.nh.Checks
docfx docs/docfx.json --warningsAsErrors true: 0 warnings, 0 errors (docfx 2.78.3, as in CI)dotnet teston the snippets: all new examples pass🤖 Converted from earlier work (ref PR #102) and have been assisted by Claude Code to create this version.