Contents
Why Automated Testing Matters for SLAs
Ensuring your ServiceNow SLAs perform as expected over time is essential—mistakes can lead to costly service disruptions or penalties. Whether creating Reusable Contractual SLA Definitions or learning how to safely modify SLAs in ServiceNow (written by my colleagues Kieran Jones and David McDonald, respectively), robust testing is crucial. In this guide, we’ll explore how the Automated Test Framework (ATF) can streamline SLA testing, helping you verify critical components such as start, stop, pause, and cancel conditions.

Imagine you’re managing SLAs across multiple regions with varying priorities and schedules. By identifying shared patterns and consolidating tests, you avoid redundancy and ensure each SLA performs as expected, regardless of location.
Using ATF, you not only save time but also create a reliable, repeatable framework that reduces the need for manual validation. As SLAs evolve, automated tests ensure stability and compliance without additional overhead.
Step 1: Identify repeating patterns
Look at a particular set of SLA measures (e.g. response, resolution, e2e) and identify their common conditions. You might get this from a design document, a contract, or, if creating regression tests, existing SLA Definitions.

In the example, we are looking at existing configurations. From the screenshot above, we observe the following patterns:
- Start condition always checks for priority
- Stop and pause conditions are the same
This will set the foundation for our Shared Parameters and Test Steps.
We have now identified that we will need to test.
- Duration
- Start condition
- Pause condition
- Stop condition
This may differ depending on the patterns you identify. For example, if you work with different timezones, you may wish to test Schedule, too.
Step 2: Create Parameter Definitions
We can test all our SLA Definitions in a single ATF Test using some good design techniques!
To enable Parameter Definitions on an ATF Test, select the Enable parameterized testing field. This can be done at any time.

After saving the record, the Parameter Definitions tab will be revealed.

We have four SLA definitions, each with its duration. Regardless of the patterns identified, we will need two Parameter Definitions for SLA Definition and Duration. If you plan on creating many more SLA Tests, you may consider creating Shared Parameters so they can be used across all your Tests. In this example, we will just use Exclusive Parameters.
Creating Parameter Definitions is similar to creating fields. Create one Reference field for the contract_sla table and another for the Duration type.

Now, we need a Parameter definition for each non-static pattern we identified.
Each SLA started with a different priority, but they all started with a priority. Priority is set by impact and urgency, so we will need parameters for those. Create two new String Parameter Definitions, as Impact and Urgency are choice fields. You can also use a Choice field if you wish.

These parameters will allow us to Test all our SLA Definitions within a single ATF Test, making it easier to create and maintain.
Step 3: Populate your Parameter Definitions
Now, we are ready to load the data we need. Select the Test Run Data Sets and create entries for all our definitions. If you have many permutations, you can do this via bulk load. Consult your priority matrix to determine the correct combination of Impact and Urgency for the Priority you wish to use.

Our Parameter Definitions and Test Run Data Sets aren’t much use without Test Steps, so lets create them now!
Step 4: Create Test Steps
To test our SLA Definitions end to end, we can follow these steps:
- Impersonate a user
- Create a new Incident
- Populate Impact and Urgency
- Populate any other mandatory fields
- Save the record
- Check correct SLA has started
- Set State to On Hold
- Check SLA has paused
- Set State to Resolved
- Check SLA has paused
- Set State to Closed
- Check SLA has stopped
In our test steps, we will populate the SLA definition using parameter definitions, including duration, impact, and urgency.
Populate Parameters in Test Steps using the pill picker and selecting Parameters.

The result is as follows:

Execute our Test
It is time to execute our Test!
Since we have created 4 Test Data Runs, the Test will run 4 times.

If you want to reference my Test, download them from ServiceNow Share, which includes the tested OOB SLA Definitions.
TLDR
- Identify repeating SLA patterns (e.g., start conditions, pause conditions).
- Set up Parameter Definitions in ATF for streamlined test configuration.
- Create Test Run Data Sets for each SLA Definition.
- Develop Test Steps that simulate SLA lifecycle conditions (start, pause, stop).
- Execute and validate to ensure SLAs function as expected.
2 comments
How do you test the Sla if its breaching or not using atf
Check the expected breach time on the Task SLA record is the expected value (+duration in schedule)