Your duplication report says 0%. Your Cucumber steps disagree.
Описание и применение
CukeDedup автоматически обнаруживает дублирующие и неоднозначные шаги в тестах Cucumber, уменьшая рост библиотеки шагов и ускоряя ревью кода.
Задача
Duplicate or near‑duplicate Cucumber step definitions grow unnoticed, leading to a bloated step library and confusing test maintenance.
Результат
CukeDedup reduced duplicate step findings by about 50% after adjusting handler similarity thresholds and improved precision by filtering literal‑only handlers. It also identified cross‑suite ambiguities and performance issues in large jQuery files.
Рабочий процесс
- Run
npx cuke-dedup .in the repository root - CukeDedup scans step definitions, compares step text and handler code
- It reports findings with source locations, similarity scores, and suggested actions
- Review the report and refactor or remove duplicate steps
- Re‑run to confirm no remaining findings
Доказательства
CukeDedup is an open‑source static analyzer that finds duplicate, ambiguous, reusable and unused Cucumber step definitions.
It works with Cucumber.js, Playwright‑BDD, Cypress Cucumber, Jest‑Cucumber and the Vitest Cucumber Plugin, and reads step definitions written in JavaScript or TypeScript.
Zero config. jscpd gets this right: you type jscpd . and you learn something.
When an issue can be isolated, I try to turn it into a minimal regression case in a corpus of expected behavior, with both "must find" and "must not find" cases.
- Дата записи: 2026-10-14T19:41:07.843Z