← ClaudeAtlas

sn-atflisted

Use BEFORE running or authoring ServiceNow ATF tests against a live dev instance — browser test runner requirement, suite creation, clean-state discipline, trigger interplay, and result polling. Hard-won on a live dev instance, 2026-08.
theogyeezy/skillz · ★ 0 · AI & Automation · score 67
Install: claude install-skill theogyeezy/skillz
# ServiceNow ATF on a Live Instance — Run & Author Playbook ## Running tests 1. **Headless is usually disabled** (`sn_atf.headless.enabled=false`): a browser CLIENT TEST RUNNER must be open or every run queues forever. Open `/nav_to.do?uri=%2Fatf_test_runner.do` in its own tab and LEAVE IT OPEN for the whole session. 2. **Make a suite instead of clicking 5 tests.** Server-side: insert `sys_atf_test_suite` + one `sys_atf_test_suite_test` m2m per test (`test_suite`, `test`, `order` 10/20/30..., `abort_on_failure=false`). Then one "Run Test Suite" click on the suite form runs everything, and the suite is a reusable regression gate. 3. **Poll results server-side**, don't watch the dialog: `sys_atf_test_suite_result` (status success/failure, filter by test_suite, newest first) → child `sys_atf_test_result` rows (`parent` = suite result; `status`, `output` holds the failure message). 4. **Re-run after ANY code change to what the tests touch.** Green before a rewrite proves nothing about the rewrite (exit gates should demand post-change green). ## Clean-state discipline (the #1 source of false failures) - **Count-based assertions are polluted by live data.** A recordQuery step asserting "exactly N rows" fails when demo/live runs left extra rows (seen live: SEC test failed finding 2 outcome rows where it expected its own 1). Before a gate run: empty the app's transactional tables, reset seed rows to source state, remove side-effect artifacts (group memberships), close stray open