Since module 2.7, every pull request has had its tests, and every issue of the final project names its evidence for every criterion. Still, after eight milestones the test suite isn’t complete. Some tests have other names than in the issue, some were written “later” and then never, and three kinds of tests are still missing on purpose: the rights test over everything that has been added since module 2.6, the booking’s whole way in the browser, and the import against a TED that really answers over HTTP.
The ninth milestone closes these gaps. It starts with a measurement, not with writing: only when you know what’s missing do you know what to do.
| Pull request | Branch | Brings | Where in this lesson |
|---|---|---|---|
| 1 | test/m9-evidence |
a script that checks every piece of evidence from the issues against the tests; the missing tests | “What’s missing?” and exercise 1 |
| 2 | test/m9-rights |
the rights test knows all endpoints, the open ones are on a fixed list | “Pull request 2” |
| 3 | test/m9-import-stub |
the import with the real client against a local TED | “Pull request 3” |
| 4 | test/m9-booking-end-to-end |
the way from the day to the confirmation in the browser | exercise 2 |
Where the Kladde stands
After module 2.7, module 2.6 and milestones 1 to 8, the solutions have this:
tests/Kladde.Core.Tests,tests/Kladde.Data.Tests,tests/Kladde.Web.Testswith the test factoryKladdeFactoryfrom lesson 2.7.3 (withClientAssince milestone 1) andtests/Kladde.EndToEndwith Playwright (lesson 2.7.7). Tests against SQL Server run whenKLADDE_TEST_SQLSERVERis set, otherwise they’re visibly skipped.- From lesson 2.6.4 there’s the matrix
RightsMatrixTestsand the rights testRightsAuditTests, which reports every endpoint without a decision about rights. - The
TedClienthas tests intests/Kladde.Ted.Testswith a fakeHttpMessageHandler(lesson 2.8.1, extended in milestone 5). - The end-to-end test from lesson 2.7.7 books an appointment and, since milestone 3, ends on the “Almost done” page.
- The pipeline from lesson 2.7.8 runs all tests in every pull request, with
dotnet test -- --minimum-expected-tests 1.
If your files, classes or folders have other names, keep yours and carry the steps over. If your test factory isn’t called
KladdeFactory, stay with your name.