The atf skill builds Automated Test Framework tests and suites. Create tests, add step types (server script, record CRUD, user creation, REST-inbound assertions), and assemble them into suites that can be triggered via the CI/CD API. Two higher-level wrap operations (wrap_decision_table_test, wrap_rest_endpoint_test) compose a full test around a declarative case list.
ATF
Automated Test Framework tests, steps, and test suites.
| Operation | Description |
|---|---|
| create_test | Create an ATF test |
| create_suite | Create an ATF test suite and add tests |
| add_server_script_step | Add a server-side script step |
| add_record_insert_step | Add a record insert step |
| add_record_update_step | Add a record update step |
| add_record_query_step | Add a record query step |
| add_record_validation_step | Add a record validation step |
| add_record_delete_step | Add a record delete step |
| add_create_user_step | Add a create user step |
| add_impersonate_user_step | Add an impersonate user step |
| add_log_step | Add a log message step |
| add_rest_step | Add a REST API call step (outbound) |
| wrap_decision_table_test | Build a full ATF test for a decision table from a case list (inputs → expected outputs) |
| wrap_rest_endpoint_test | Build a full ATF test around a REST endpoint — basic-auth profile + status-code + JSON payload + substring assertions per case |
Run sn ops atf to see the full list and sn ops atf <op> for the input schema of a specific operation.
REST-inbound testing. wrap_rest_endpoint_test is the recommended way to exercise any REST endpoint (scripted REST APIs, Table API, custom APIs) from ATF. Each cases[] entry emits a Send REST Request - Inbound step plus four assertion types:
- Status Code — expected HTTP status.
- JSON Payload Is Valid — the body parses as JSON.
- JSON Payload Element — per
payload[]entry, a slash-path + expected value structural check. - Response Payload — per
bodyContains[]entry, a substring match against the whole body (for responses whose shape is dynamic).
authProfile is a discriminated union: {sys_id} to reference an existing sys_auth_profile_basic, or {username, password, name?} to create one. Supplied credentials are only used on the create path — if a profile with the given name already exists, the wrap preserves its existing credentials.
ATF REST-inbound steps authenticate via basic auth only. The sys_auth_profile_basic record you reference (or create) must carry a user with roles to hit the endpoints under test.
Write ATF tests for my business rule that validates incident priority — test that P1 incidents get auto-assigned.