Getting started with the Automated Test Framework
Summarize
Summary of Getting started with the Automated Test Framework
The Automated Test Framework (ATF) in ServiceNow enables you to create, configure, and run automated tests to validate your instance’s functionality efficiently. This framework supports a broad range of testing scenarios, from simple user interface interactions to complex server-side validations, helping ensure your instance operates as expected after changes or updates.
Show less
After familiarizing yourself with the basics through tutorials, you can leverage ATF’s advanced features to build comprehensive test suites that improve testing coverage and reliability.
Key Features
- Test Step Configuration Categories: ATF provides predefined test steps for diverse areas such as:
- Service Catalog in Service Portal: End-to-end testing of catalog items, record producers, order guides, including variable validations and cart operations.
- Application Navigator: Validate navigation menus and modules, simulating user clicks.
- Custom UI: Mimic user actions like setting component values, clicking, and validating component states without scripting.
- Form Testing: Open forms, set and validate field values and states, interact with UI actions, and submit forms.
- REST: Create and send inbound REST requests to test endpoints, with verification of response status, headers, time, and payload.
- Server: Perform complex server-side operations including unit tests with JavaScript and Jasmine framework, testing business rules and script includes.
- Forms in Service Portal: Similar form testing features as standard forms but within the Service Portal context.
- Output Variables: Many test steps return output variables that can be reused as inputs in subsequent steps, enabling dynamic and dependent test flows.
- Custom Test Step Configurations: You can create custom server-side test steps with defined inputs and outputs to extend testing capabilities beyond built-in steps.
- Data Preservation: ATF automatically tracks, deletes, or rolls back data changes created during testing, ensuring your instance remains clean and stable after tests run.
- Test Suites: Organize tests into suites that can run batches of tests sequentially or hierarchically. Suites can be scheduled to run automatically at specified times.
- Domain Separation Support: ATF respects domain separation within your instance, allowing you to test in logically separated domains with appropriate data and process controls.
Practical Application for ServiceNow Customers
ServiceNow customers can use ATF to automate validation of key platform functionalities, reducing manual testing effort and increasing confidence in changes before deployment. By leveraging predefined test steps and customizing as needed, customers can ensure critical workflows—such as catalog ordering, form submissions, navigation, and REST integrations—work correctly.
Starting with simple tests, such as creating a user record, helps build familiarity, after which customers can develop sophisticated test suites tailored to their instance’s unique configurations and processes. The framework’s data preservation ensures test runs do not pollute production data, and domain separation support maintains security and data boundaries during testing.
Overall, ATF empowers ServiceNow customers to improve quality assurance, accelerate release cycles, and maintain instance stability through automated, repeatable testing.
If you are new to the Automated Test Framework, read this overview to learn what the framework can do. Next, follow the tutorial to create and run a test that uses the most basic of ATF features. After you feel comfortable with the basics, explore more advanced features provided by the ATF.
ATF features provide flexibility in how you test your instance.
Test step configuration categories
| Category | Description |
|---|---|
| Service Catalog in Service Portal | Perform end-to-end testing for a catalog item in the Service Portal.
|
| Application Navigator | Create tests to check navigation features.
|
| Custom UI | Create simple tests that mimic user actions with no scripting.
|
| Form | Create tests of forms.
|
| Service Catalog | Perform end-to-end testing for a catalog item.
|
| Forms in Service Portal | Create tests of forms in the Service Portal.
|
| REST | Create and send an Inbound REST request and verify the response.
|
| Server | Perform more complex operations, including the following:
|
Output variables
- Perform a server-side assert on a record that you previously inserted.
- Create a record as one user, and then reopen its form as a different user.
Custom test step configurations
Data preservation
The Automated Test Framework automatically tracks and deletes any data created by running tests, and automatically rolls back changes after testing.
Test suites
Test suites enable you to execute a batch of tests in a specified order. In addition, test suites can be hierarchical, with suites nested within other suites. You can associate test suites with schedules that determine when the system runs the test suites.