Skip to content

Copy-pasted test cases instead of one parametrized test ​

Code that already exists: one of the ways AI coding agents bloat software, from lessloc's pattern catalog. lessloc catches it as copied-tests.

What makes copy-pasted test cases instead of one parametrized test a bad practice? ​

The standard that calls it a bad practice: Meszaros, xUnit Test Patterns: Test Code Duplication.

What does lessloc do about copy-pasted test cases instead of one parametrized test? ​

lessloc catches it as copied-tests.

  • copied-tests (tier 2): Copy-pasted test cases that one table-driven test would cover.

The other patterns in Code that already exists:

Released under the Apache-2.0 license. · llms.txt