generate_atf_tests
Generate ATF test cases for ServiceNow artifacts including business rules, script includes, REST APIs, forms, and table validations. Returns ready-to-import test suite JSON.
Instructions
Generate ATF (Automated Test Framework) test cases for ServiceNow artifacts.
Supported test targets: business_rule — positive, negative, and field-change trigger tests script_include — unit tests per method (happy path + null/invalid input) scripted_rest — auth, validation, and custom scenario tests form — Client Script / UI Policy field behaviour tests table — mandatory field, uniqueness, and basic CRUD smoke tests
Returns ATF test suite JSON with steps ready to import + deploy instructions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_type | Yes | ||
| name | Yes | Name of the artifact under test | |
| table | No | Table name (required for BR, form, table tests) | |
| trigger_conditions | No | ||
| field_changes | No | ||
| expected_outcomes | No | ||
| methods | No | ||
| api_path | No | ||
| verb | No | ||
| required_params | No | ||
| test_cases | No | ||
| scenarios | No | ||
| mandatory_fields | No | ||
| unique_fields | No |