A parent enters a grade in Homeschool Ace. The form says “Saved.” I still want to know where the grade went. Did the gradebook pick up the new score? Did the report card use it when calculating the course grade? Did the update show up in the inbox for the right student?
As Homeschool Ace grew, I reached the limit of what I could verify by clicking through the app myself. I already had Playwright running, and I still needed to write down the journeys I cared about and build tests that followed them. For a grade, that meant spelling out where the parent makes the change and every place the family should see the result.
Think about what it took to go from releasing twice a year to releasing every two weeks. A two-week Scrum sprint gave teams a cadence. They still had to figure out how to build, test, and deploy on that schedule. If verification took weeks, the calendar was the easy part. I wrote about some of that in Serverless and Agile.
I think coding agents put even more pressure on the same discipline. First we spend time deciding what to build. Then we spend time building it. An agent can shorten the second part considerably. If every change still takes a person an afternoon to verify, we can finish writing code faster than we can decide whether it works. We’ve moved the bloat to verification.
If the automation is already there, the transition feels a lot smoother. An agent can run the same checks I run, and I have a place to start when I review the change. That only helps when the tests are fast enough to run often, dependable enough to believe, and specific about the behavior they expect.
Start with the rules
Suppose I’m working on grades in Homeschool Ace. What happens to a course grade when an assignment has no score yet? How do we handle a zero? What should happen when a parent changes a score they already entered? I want to be able to write down the inputs and the answer I expect for each case. Unit tests give me a cheap way to check those rules every time the code changes.
I put small frontend component tests at the same end of the pyramid. Give a grade editor a score it should reject, click Save, and check what the parent sees and whether the save was attempted. One interaction, one behavior. I can check that without an account, a database, or a whole school year’s worth of data.
The same inputs should give me the same result each time. If a rule depends on today’s date, I want to supply the date. And when an agent writes the test along with the code, I read the expected result closely. Both can agree with each other and still get the grading rule wrong.
Test what crosses a boundary
The next question is whether the pieces work together. I’d use an integration test to save the grade through the API and read it back using a real test database. That’s where I’d catch things like a field getting dropped in a write, or a query reading the wrong student’s assignment. I’d also check the calls the system makes, including whether saving the grade publishes the expected event and whether the receiving handler does the right thing with it.
Contract tests give me a more focused check of what one side can expect from the other. That applies to APIs the system exposes, APIs it calls, and messages it publishes or consumes. If a change turns a numeric score into a string, validating the published event against its schema should catch it. If the consumer depends on an assignment identifier, I’d verify that both sides still agree on what that field means and how it’s supplied. Pact’s introduction to contract testing
Check what each screen reads
The failure I care about most here is data accuracy. Did the score land on the right assignment for the right student? When another screen reads that data, does it apply the same rules? A gradebook can show the new score while a report card still calculates the course grade using a different set of assignments.
A service layer helps by giving shared logic a home. Over time, a service can take on too many responsibilities, and a screen can end up with its own query. I want a test that verifies what each screen actually shows. I’d start with a student whose scores I know, enter a grade that should change the course grade, and check the exact result I expect in the gradebook, the report card, and the inbox. I want to work out those expected results from the grading rules, without using the same code that produces them.
I aim for ten minutes
That journey costs more to run. It needs a seeded family, a student, a course, and an assignment in a known state. It can get flaky if a parallel test changes the same records or if something downstream takes longer than expected. I’d give each test its own data and wait for the expected update with a deadline, so a timeout tells me which result never showed up.
I try to keep the end-to-end suite around ten minutes. I shard it heavily, splitting the tests across jobs that run in parallel. The slowest shard still sets the pace, and I’m paying for the time across all of those jobs. The more tests I run at once, the more important it is to keep their data isolated. Playwright’s guide to sharding
Decide what runs where
I want the unit and small component tests available while I’m working, and I want them running on every pull request. I’d run the relevant integration and contract tests before merging because a database or API change is worth catching there. A few journeys that cover the most important things customers do can earn a spot in that same pipeline. A broader set of slower journeys can run in a seeded environment on a schedule or before a release that warrants it.
That’s why I still like the test pyramid. Run the quickest check that can catch the failure you’re worried about. Spend the time on a full journey when the value is in seeing several parts of the system work together. Martin Fowler on the test pyramid
When I think about how much AI is helping, I want to count the whole trip from an idea to a change I trust enough to ship. If the code gets written faster and the review queue keeps growing, I’d put the next hour into a test I can trust the next time an agent hands me a change.