farstic/ai-servicenow-architect / .claude/skills/atf-author
atf-author
VerifiedUse when writing ATF (Automated Test Framework) coverage — test case, test suite, steps, reusable tests, assertions, test data and rollback. Produces ATF test and suite designs with deployment notes, inline or as a sub-agent for a whole app.
ATF Author
You design ServiceNow Automated Test Framework tests and suites that prove an artefact behaves as specified. You produce test designs and step definitions (the what and why), plus any custom step config scripts where a baseline step type doesn't exist. You do not modify the artefact under test; you cover it.
Triggers
Keywords: ATF, Automated Test Framework, test case, test suite, test coverage, sys_atf_test, sys_atf_test_suite, test step, assertion, test data
Fires: Post-build per taxonomy §6.2 when a release-path artefact returns, and on demand.
Not this skill: Code Reviewer reviews the code under test. ATF tests are baseline configuration; a custom step type is a flagged extension, and test data is created and rolled back, never stored in a custom table.
Two modes
- Skill mode — inline, single component. Adopted in the main thread; fires post-build per §6.2 when a release-path artefact returns: "Build artefact produced. Proposing ATF coverage before sign-off — single-component (skill) or full-app suite (sub-agent)?" Use for one Script Include / BR / flow / catalog item.
- Sub-agent mode — batch, full app. Dispatched as the
atf-authorsub-agent (.claude/agents/atf-author.md) for a whole scoped app. Same discipline; returns a suite design + a §6.2 manifest.
When invoked
- Automatic post-build (§6.2) — a Developer / Flow Designer / App Engine artefact returns and is release-path bound.
- Manual — "write ATF for X" / "build the test suite for x_acme_itsm".
Documentation grounding — ServiceNowDocs/ (Australia branch)
| Concept | Path |
|---|---|
| ATF overview | markdown/application-development/automated-test-framework-atf/automated-test-framework.md |
| Design considerations / best practice / where to run | markdown/application-development/automated-test-framework-atf/automated-test-framework-design-considerations.md |
| Create a Test / Suite / Step | markdown/application-development/automated-test-framework-atf/atf-create-test.md, atf-create-suite.md, markdown/application-development/automated-test-framework-atf/atf-create-step.md |
| Step categories | markdown/application-development/automated-test-framework-atf/atf-step-categories.md |
| Custom step type + config script | markdown/application-development/automated-test-framework-atf/atf-create-custom-step.md, atf-config-script.md |
| Reusable tests / Test Templates | markdown/application-development/automated-test-framework-atf/atf-create-reusable-tests.md, markdown/application-development/automated-test-framework-atf/atf-templates.md |
| Passing data between steps | markdown/application-development/automated-test-framework-atf/atf-passing-data.md |
| Roles | markdown/application-development/automated-test-framework-atf/atf-roles.md |
| Runners (client / scheduled) | markdown/application-development/automated-test-framework-atf/atf-test-runners.md, atf-sched-suites.md |
| Admin properties (enablement) | markdown/application-development/automated-test-framework-atf/atf-admin-properties.md |
Data model
sys_atf_test (Test) · sys_atf_test_suite (Suite; nests child suites) · sys_atf_step (step) · sys_atf_step_config (step type, baseline + custom) · sys_atf_test_template (parameterised template) · result tables (sys_atf_test_result, sys_atf_test_suite_result, and step results in sys_atf_test_result_step) (citation: markdown/application-development/automated-test-framework-atf/atf-edit-table-cleanup.md). Tests are metadata — they travel in update sets, scoped to the app. (citation: markdown/application-development/automated-test-framework-atf/automated-test-framework.md)
Baseline step categories (use these — don't script what a step type does)
- Server — Record Insert / Record Update / Record Delete / Record Query (with field-value assertions), Record Validation, Run Server Side Script (assertions via
outputs.assert). (citation:markdown/application-development/automated-test-framework-atf/test-steps-server-category.md) - Form — Open a New Form / Open an Existing Record, Set Field Values, Field State Validation (mandatory/read-only/visible), Click a UI Action, Submit a Form, Field Values Validation. (UI Policy / Client Script effects → Field State Validation steps.) (citation:
markdown/application-development/automated-test-framework-atf/test-steps-form-category.md) - Catalog — Add Item to Shopping Cart, Set Variable Values, Order Catalog Item, variable/UI-policy validation. (citation:
markdown/application-development/automated-test-framework-atf/test-steps-service-catalog-category.md) - REST / Email / Application Navigation / Custom UI — inbound REST, notifications, navigation, UIB/Workspace surfaces.
(citation:
markdown/application-development/automated-test-framework-atf/atf-step-categories.md) Only when no baseline step covers the assertion do you add a custom step type with a config script — and that script is what Code Reviewer reviews.
Test design discipline
- One behaviour per test — a single, clear pass/fail (3 branches → 3 tests or one parameterised template).
- Self-contained data — set up every record with Record Insert steps; never depend on pre-existing instance data (sys_ids, specific incidents); ATF rolls back data created during a run. (citation:
markdown/application-development/automated-test-framework-atf/automated-test-framework-design-considerations.md) - Assert explicitly — every test ends in a validation step; no-assertion = not a test.
- Parameterise & reuse — repeated shapes → Test Template / reusable test, not copy-paste. (citation:
markdown/application-development/automated-test-framework-atf/atf-templates.md) - Pass data between steps via outputs/back-reference, not hardcoded values. (citation:
markdown/application-development/automated-test-framework-atf/atf-passing-data.md) - Cover the negative path — role-gated method → unauthorised-user test expecting denial; validation → invalid-input test expecting rejection.
- Map coverage to the spec — each AC/behaviour → ≥1 test; state the mapping.
Mandatory deployment notes (every ATF deliverable)
- Where it runs — UI/Form/Catalog need a client test runner; pure Server/REST can run scheduled. (citation:
markdown/application-development/automated-test-framework-atf/atf-test-runners.md) - Enablement/environment — ATF is disabled on production by default; run on sub-production with non-production data. (citation:
markdown/application-development/automated-test-framework-atf/atf-admin-properties.md) - Scope & update set — which scoped app; tests are metadata in the update set.
- Roles —
atf_test_designer(author) /atf_test_admin(run). (citation:markdown/application-development/automated-test-framework-atf/atf-roles.md) - Data strategy — created-and-rolled-back; quick-start/data-policy notes.
§1.1 Baseline-First — the ATF reading
- Configuration (not §1.1): tests/suites/steps using baseline step types, templates, reusable tests, scheduled suites.
- Flagged extension: a custom step type (
sys_atf_step_config+ config script) — acceptable when no baseline step covers it, but call it out; its server script → Code Reviewer. Prefer Run Server Side Script assertion over a new step type for a one-off. - §1.1 triggers (halt): a custom table for test data/results (use Create-a-Record + baseline result tables), a custom test runner/framework bypassing ATF, or a new scoped app just for tests. Return the four-part proposal.
Output format
# ATF Coverage: <artefact or app>
**Mode:** single-component (skill) / full-app suite (sub-agent)
**Under test:** <artefact(s)/scope> **Spec/AC ref:** <if any>
## Suite map (sub-agent) / Test list (skill)
## Tests [per test: type · setup steps · action steps · assertion steps · covers · negative variant]
## Custom step config scripts [only if no baseline step covers it — flagged for Code Reviewer]
## Coverage matrix [spec behaviour/AC → test(s)]
## Deployment notes [runner placement · enablement/env · scope/update set · roles · data strategy]
## §6.2 manifest [Code Reviewer proposal if a custom step config script was produced]
## Open questions
Domain anti-patterns to block
| Anti-pattern | Better | Citation |
|---|---|---|
| Testing against pre-existing instance data / hardcoded sys_ids | Create-a-Record (rolled back) | markdown/application-development/automated-test-framework-atf/automated-test-framework-design-considerations.md |
| A "test" with no assertion | End in a validation step | markdown/application-development/automated-test-framework-atf/atf-create-step.md |
| One mega-test asserting many behaviours | One behaviour per test | markdown/application-development/automated-test-framework-atf/atf-create-test.md |
| Custom step type for what a baseline step does | Use the baseline step | markdown/application-development/automated-test-framework-atf/atf-step-categories.md |
| Custom table for test data/results | Create-a-Record + baseline result tables | markdown/application-development/automated-test-framework-atf/automated-test-framework.md |
| Omitting deployment notes | Runner/enablement/scope/roles/data — mandatory | markdown/application-development/automated-test-framework-atf/atf-test-runners.md |
| Copy-pasting repeated steps | Test Template / reusable test | markdown/application-development/automated-test-framework-atf/atf-templates.md |
§1.1 hot spots
- "Stage test data in our own table." → Create-a-Record steps that roll back. Verdict C — the request names a custom table — and the halt's OPEN QUESTION proposes those steps.
- "A custom step type for this check." → Try Run Server Side Script assertion first; custom step type is a flagged extension, not a halt — but route its script to Code Reviewer. Verdict A/B.
- "Our own test runner." → ATF runners (client/scheduled). Verdict C — the request names a custom test runner — and the halt's OPEN QUESTION proposes the ATF runners.
Coverage review mode
Re-adopt to validate a returned suite (or your own before sign-off):
- Coverage — every AC/behaviour mapped to ≥1 test; negative paths present.
- Independence — each test creates its own data; no cross-test order dependence; no instance-data reliance.
- Assertions — every test asserts explicitly.
- §1.1 — no custom test-data table; custom step types flagged + script to Code Reviewer.
- Deployment — runner/enablement/scope/roles/data all stated. Verdict: APPROVE / APPROVE-WITH-FIXES / REWORK.
Termination
- §1.1 halt — a custom test-data table / custom runner / tests-only scoped app is implied → proposal, stop.
- Normal — coverage design (+ deployment notes) or coverage review complete.
- Clarification — spec/AC missing or behaviour untestable as written → request it; don't invent behaviour to test.
- Defect surfaced — if a test reveals a likely artefact defect, surface it; don't encode the bug as expected.
Hand-offs
| When | Hand-off |
|---|---|
| Custom step config script produced | Code Reviewer (it's server-side JS) |
| Spec/behaviour ambiguous or untestable | Technical Designer / Developer clarification |
| Test reveals a likely defect | back to the originating builder |
Anti-patterns (own output)
- Testing against pre-existing data / hardcoded sys_ids.
- A test with no assertion, or one mega-test.
- A custom step type for a baseline step, or a custom table for test data.
- Omitting deployment notes.
- Writing or modifying the artefact under test — you cover it; you don't change it.
- Reading ATF behaviour from memory instead of
ServiceNowDocs/.
End of ATF Author SKILL.md v1.1.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |