What you will learn
- Coverage is a guide to gaps, not a universal quality score or stopping rule.
- Reviewed tests can also document the behavior your team expects.
- AI can help draft tests, but it does not replace testing judgment.
- Prioritize payment, authentication and data integrity where failures would cause the most harm.
Imagine a team with 40% test coverage. Three people understand how the payment system works. One of them left last month.
If hiring is out of reach and tests keep slipping behind feature work, a poorly tested payment module remains a problem. That situation bothers me more than it probably should. Because it’s so fixable. Running tests via non-interactive automation can help keep useful checks in regular use.
Claude Code can help draft and run tests, provided your team supplies the expected behavior and checks the results.
Why does test writing fall behind?
A large codebase takes time to test well. Budget and time constraints can limit that work, but there is no useful universal quota of functions a tester should cover in a day.
Tests for business logic, edge cases and error handling compete for development time. Decide which failures matter before deciding how many tests to write.
In the example above, the question is which payment behaviors remain unchecked, not whether the headline number is 35% or 40%.
Hiring also requires testing expertise. A testing vendor discusses that difficulty, but it does not provide a labor-market measurement that tells you how hard your own hiring will be.
What can AI test generation do?
Claude Code can suggest tests your team has not considered. Treat those suggestions as candidates for review.
Give it the function, relevant surrounding code and the expected behavior. Ask for happy paths, error conditions and edge cases. Model choice and session management affect the work, but neither guarantees that it retains every important requirement.
Ask for test names and comments that explain the intended behavior. A reviewed test can show what a payment function should return when something goes wrong. If a validation function returns null instead of throwing, record why that is the required behavior rather than merely copying what the implementation does.
For example, a test might check a currency-specific rounding rule or the required response to an invalid token. ISO 4217 does not mean every currency uses two decimal places. Useful assertions document the agreed behavior; comments alone are not checked when tests run. Is there a better kind of documentation than one that breaks loudly when it goes out of date? I can’t think of one.
Claude Code checkpoints can rewind tracked file edits while you try a different testing approach. They do not restore every shell command, external effect or subagent edit, so keep normal version control and inspect the diff.
A reviewed test suite can be useful system documentation. Unlike that rubbish wiki page nobody updated for 8 months.
If your team is stuck here, contact Blue Sheen.
What does 80% coverage tell you?
A discussion of coverage and defects is a starting point, not proof that returns always fall sharply above 80%. Choose the target from the risks and the behaviors you need to verify.
Even 100% coverage does not establish that the assertions are correct. Bullseye’s coverage guidance makes the target depend on risk and cost. A 2017 SAP HANA study examined 16,215 bug-fixing commits from May 2016 to April 2017. Covered code had fewer later fixes than expected under a uniform distribution in 70 of 72 time segments. The authors explicitly did not establish causation. Their result does not mean covered code has half the bugs, or that 80% is the right stopping point.
Focus testing effort on business logic, complex calculations, money, authentication and data transformations. Check the impact of a failure before deciding that simple-looking code does not need a test.

This is an illustrative report. The screenshot runs coverage_sim.sh; it is not a measurement of a production project.
This isn’t laziness. It’s being smart with limited time.
What to watch for
I think the biggest trap is treating AI test generation as a one-time dump and forget. It isn’t.
Claude Code test generation makes mistakes. Sometimes it generates tests that pass but test nothing real. Sometimes it misunderstands what a function should do. Review the generated tests and the requirement behind each assertion. Run them and verify they fail for a relevant incorrect result.
Watch for tests whose mocks replace the behavior they claim to check. Mocking a database or API can be useful for a unit test; it does not establish that the real integration works.
The AI needs the business requirements that are not visible in the code. If a payment function must handle a particular case, explain that requirement and its expected result. Maintain the tests when the requirements or implementation change, and check that a regenerated test has not silently changed the expectation.
Making this work for your team
Don’t try to test everything at once. Pick your most critical path and start there.
Payment, authentication and data integrity are example priorities. Use the remaining risks to decide what comes next.
If payments are central to your product, start there. Ask for tests covering the relevant rounding, currency conversion and partial-payment rules, then check the expected values against your requirements.
Authentication is another high-impact area. Depending on the system, tests may need to cover password handling, sessions and token expiration, including expected failures.
Data integrity also deserves attention: migrations, preservation of information and the results of important queries.
UI components, formatters and configuration loaders can also carry important behavior. Include them when a failure would affect users or system operation.
GitHub’s guidance on AI test generation stresses being specific in your prompts, giving the tool enough code context, and reviewing every suggestion rather than trusting it blind. The same discipline pays off with Claude Code test generation. For broader tool selection, see how Claude vs Amazon Q handle test generation differently, or compared to Cursor for IDE-integrated workflows.
Claude and Copilot for testing
Both Claude Code and Copilot agents can inspect a workspace, change test files and run checks. A larger context window does not by itself make an integration test correct. Compare the workflow and the assertions you can review.
Start small. Pick one module. Generate tests for it and review them with your team. Compare the proposed cases with the requirements, including errors and boundary conditions.
A 2021 survey of test-automation practitioners, focused on organizations in Bengaluru, collected 54 responses and used 49 after cleaning. It examined reported automation practices and returns, not Claude Code or a controlled test of cost savings. Start with a realistic scope and expand as you establish which checks are useful.
Run the tests and investigate failures. A failure may expose a production bug, a wrong expectation or a broken fixture. Establish which before changing the implementation.
Then expand to another module and track coverage alongside the behaviors being checked. Reaching 80% is a reason to inspect the remaining gaps, not a reason to stop adding useful tests.
Integrate tests into your build process. Tests that don’t run are worthless. Every pull request should run the full test suite. Every deployment should require passing tests.
This works best for teams with established codebases that need test coverage they can’t afford to write manually. If you’re already writing thorough tests, keep doing that. If you’re not, and you need to be, this is how you catch up.
Claude Code is included with a Claude Pro subscription, subject to the plan’s shared usage limits. API billing is separate. Its terminal interface does not require a particular IDE, though your project still needs its normal test tools and environment.
Mid-2026 update: interactive Claude Code is still part of your paid plan, so the picture above holds for a developer generating tests by hand. The one change worth knowing if you script test runs through automation: from June 15, 2026 the Agent SDK and claude -p stopped counting against plan limits and draw on a separate monthly credit instead. For the workflow in this post that is a footnote, not a blocker.
Update (September 2026): the automation half of that did not stick. Anthropic paused the June 15, 2026 rollout, so the Agent SDK and claude -p still draw on your plan’s usage limits rather than a separate monthly credit.
Current billing note, November 17, 2026. The October 7 update distinguishes the sign-in method: SDK and claude -p use still draws on subscription limits when signed in with a Claude plan. The monthly API credits now included with Max, Ultra and Team apply when those tools use an API key from the linked Console organization.
A useful test suite gives you evidence about specific behavior. Neither 80% coverage nor AI-generated tests guarantee a quiet weekend or replace a particular number of QA engineers.
For the example team with 40% coverage, the next step is to review the payment module with the people who still know it. Claude Code can draft tests from that knowledge; it cannot recover undocumented decisions from someone who has left. Keep the cases that check agreed requirements and make the gaps visible.



