ATK Anti-Patterns
When to Use
Before adopting ATK, or when debugging unexpected failures.
Common Mistakes
- Wrong: linking to
github.com/PerformantLabs/atk-cypressoratk-playwright→ Right: those 404; usegit.drupalcode.org/project/automated_testing_kit - Wrong: running
drush atk:preflight→ Right: the pre-flight runs inside the test run (setupproject or Cypressbefore()) - Wrong: running
drush testor:*→ Right: Testor is its own CLI:testor snapshot:restore --name=qa - Wrong: selecting
[data-qa-id=…]→ Right: ATK adds only body classes anddata-media-id; use Drupal's markup or your own attribute - Wrong: importing from
../helpers/atk→ Right:import * as atkCommands from '../support/atk_commands' - Wrong:
drush recipe modules/contrib/automated_testing_kit_demo_recipe→ Right:drush recipe ../recipes/automated_testing_kit_demo_recipe - Wrong: copying from
tests/playwright/orjs-helpers/→ Right: runmodule_support/atk_setup playwright - Wrong:
drushCmd: 'drush'against DDEV from the host → Right:drushCmd: 'ddev drush' - Wrong: putting Terminus or SSH in
drushCmd→ Right: use thepantheonortargetSiteblock - Wrong: editing
tests/atk_*in place → Right: copy to your own directory;atk_setupoverwrites them - Wrong: running the catalog on a bare site → Right: apply the demo recipe, or enable each suite's modules
- Wrong: removing
sanitize.commandfrom.testor.yml→ Right: keep it;snapshot:createsanitises by default - Wrong: committing
.testor_secret.yml→ Right: keep secrets in it or in environment variables - Wrong: enabling ATK or
qa_accountsin production → Right: test sites only; ATK servesdata/to anonymous users andqa_accountssets password = username - Wrong: installing both
drupal/qa_accountsandperformant-labs/qa_accounts→ Right: pick one; they share a machine name - Wrong: treating a FedRAMP pass as certification → Right: it is one check among several
- Wrong: using 2.1 steps on a 2.0.0 site → Right: check Versions & Compatibility first
- Wrong: expecting ATK to ship visual regression → Right: layer Playwright's VR on top
- Wrong: tests that depend on each other's state → Right: each test cleans up; restore a Testor snapshot for a baseline