CCAR-F practice › Claude Code Configuration & Workflows · Question 67 of 105

Claude Code Configuration & Workflows

A CI job uses Claude Code to generate unit tests for changed modules. Reviewers report that about half of the suggested tests duplicate scenarios the existing suite already covers. What is the most effective fix?

Show answer and explanation

Answer: B — Provide the module's existing test files in context when generating tests

Claude can't avoid duplicating tests it can't see. Providing the existing test files in context lets generation add only scenarios the suite doesn't already cover. Documenting testing standards and available fixtures in CLAUDE.md further improves quality. (A) cuts useful tests along with duplicates. (C) is a brittle after-the-fact filter, because similar scenarios can have different names. (D) applies a review technique to a generation problem.