Career & Leadership › Junior Habits & First Job
Testing Your Own Work
Checking that your change works before calling it done.
Also known as: self-testing, test your own changes, verifying your change, manual testing before review, checking your work
Before you say “done” or request review, check that your change actually works. It sounds obvious, and a surprising number of broken pull requests fail on the first thing a reviewer tries.
A simple routine
- Run it for real. Start the app and use the feature as a user would, not just the happy path.
- Try the unhappy paths: empty input, wrong input, very large input, double clicks (double submission), no network, a user without permission.
- Check the edges: first and last items, zero, one, many, special characters, long text, other time zones, mobile.
- Reproduce the original bug, then confirm it’s gone (reproducing a bug). If you can’t see it fail first, you can’t know you fixed it.
- Run the automated tests, all of them, not just yours, and add new tests for what you changed (unit tests, regression tests).
- Check what you might have broken nearby: other pages, callers of the function, the same code in another place.
- Read your diff (self-review).
- Test in an environment close to production if you can (environments), since “works on my machine” isn’t the bar.
Checklist before opening the PR
[ ] Happy path works in the browser
[ ] Error states shown correctly
[ ] Tests added/updated; full suite passes
[ ] Bug reproduced before, gone after
[ ] No leftover debug code
Habits
- Don’t assume. “It should work” isn’t the same as “I saw it work.”
- Write down what you tested in the PR description, so the reviewer knows what’s covered, and what you didn’t test.
- Don’t treat reviewers or QA as your test suite. They catch what you missed, and they shouldn’t be the first to run it.
- Test the thing, not a mock of it, at least once. Passing unit tests with mocks can hide a broken integration (integration tests).
- Automate what you do twice. A manual check you repeat should become a test.
It’s part of being done (definition of done). Learning to test your own work well is one of the fastest ways to earn trust as a junior.