Getting started with the Automated Test Framework
Summarize
Summary of Getting Started with the Automated Test Framework
The Automated Test Framework (ATF) is designed to facilitate testing within ServiceNow instances. New users are encouraged to start with a basic tutorial to create and run simple tests, progressing to more advanced features as they gain confidence.
Show less
Key Features
- Service Catalog in Service Portal: Conduct end-to-end testing of catalog items, including setting variables, validating prices, and navigating order guides.
- Application Navigator: Verify the presence of application menus and modules, and simulate user navigation.
- Custom UI Testing: Create tests that mimic user actions without scripting, including validating components and their states.
- Form Testing: Test various form functionalities such as field value validation, visibility checks, and UI action interactions.
- REST Testing: Evaluate REST endpoints by sending requests, verifying responses, and manipulating records.
- Server Testing: Execute unit tests using JavaScript, focusing on business rules and script includes.
- Output Variables: Utilize output variables from one test step as inputs for subsequent steps, enhancing test interactions.
- Custom Test Step Configurations: Create tailored test steps that accept and return user-defined variables, limited to server-side execution.
- Data Preservation: The framework automatically manages data created during tests, ensuring a clean rollback post-testing.
- Test Suites: Organize tests into suites that can run in a specified order, allowing for hierarchical structuring and scheduling.
Key Outcomes
By leveraging the Automated Test Framework, ServiceNow customers can streamline their testing processes, ensuring that applications and services function correctly while maintaining data integrity. Customers can expect enhanced testing capabilities, increased efficiency, and the ability to manage complex test scenarios effectively.
Next Steps
Once comfortable with basic testing, users should explore advanced features, including domain separation, to optimize their testing strategies and better manage data visibility and access.
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.