letsrunit-writer
Letsrunit writer
Produce .feature files that describe user behavior and run with the project's Letsrunit setup. The feature is the lasting test; a successful exploratory browser run alone is not the deliverable.
Understand the test contract
Read the requested behavior, the relevant UI or application code, neighboring features, support files, and cucumber.js (or its equivalent). Identify:
- The user-visible behavior and the outcome that proves it.
- The starting state and test data required to make the result reproducible.
- The distinct success and failure cases that matter to this change.
- Existing scenarios that already cover part of the behavior.
Write a new scenario only where it adds a distinct regression signal. Extend an existing scenario when it already owns the same behavior and the new assertion belongs to that flow. Keep unrelated behaviors in separate scenarios so a failure points to a useful cause. For a change to an existing feature, read maintaining tests when deciding whether a failing expectation or locator should change.
Decide coverage from the behavior, not the number of UI controls. A useful scenario usually has one principal action and one or more checks of its consequence. A separate scenario is warranted for a different permission, validation result, or state transition. Avoid assertions that only repeat the setup. For a bug fix, write a check that fails for the reported bug and passes for the intended result; retain it as a regression test.