OBLYTECH Logo
OBLYTECH Logo
ServiceNow Automated Test Framework: Guides and Services
Home / Guides, Services and Solutions / Now Platform and Development: Guides and Services / ServiceNow Automated Test Framework: Guides and Services

ServiceNow Automated Test Framework: Guides and Services

What the Automated Test Framework Covers

The ServiceNow Automated Test Framework is the platform’s built-in tool for creating and running tests against customizations, configurations and upgrades. It includes test record creation, test step definition, test execution and test result reporting. The framework uses a simple interface where testers define steps like “navigate to table”, “enter value in field”, and “verify condition met”. Tests run automatically on demand or scheduled, capturing results and screenshots for investigation.

The framework integrates with the ServiceNow development lifecycle. You use it to test application changes before moving them to production, to validate that upgrade processes do not break customizations, and to run regression tests during ongoing platform changes. Most platform teams use it for high-value tests where the cost of missing a defect exceeds the cost of building and maintaining the test.

Test Layers and Testing Strategy

Most organisations structure testing in layers. Unit tests validate individual components in isolation—a business rule calculates the right value, a script includes or excludes records correctly. Functional tests validate that features work end-to-end: a user submits a request, the system processes it through approval and fulfillment, and the result is correct. Integration tests validate that ServiceNow interacts correctly with external systems. Performance tests validate that changes do not degrade response time.

The Automated Test Framework is most valuable for functional and integration tests. Unit tests of business logic often use developer tools outside ServiceNow or testing frameworks that are faster for developers to write and run. Integration tests using the Automated Test Framework validate the full pathway including UI interactions, workflow processing and outbound API calls.

Decide which tests justify the effort. Building, maintaining and troubleshooting a complex test takes time. Tests for frequently-changed functionality may need constant updates, making them expensive to maintain. Focus on core business processes that change rarely and have high impact if broken. Aim for tests that catch defects valuable enough to justify the maintenance burden.

How Oblytech Supports Automated Testing

Oblytech helps platform teams establish testing discipline and build test coverage for high-value workflows. We work through three engagement models depending on your needs.

In consulting engagements, we assess your platform’s testing maturity, recommend which workflows justify automated tests, and help you plan a testing roadmap. We teach your team how to structure tests effectively and how to troubleshoot failing tests. We help you integrate test execution into your deployment process so tests run automatically during releases.

In implementation engagements, we build test suites for your critical workflows. This includes designing test scenarios, implementing tests in the Automated Test Framework, validating that tests accurately reflect your business requirements, and documenting test maintenance procedures. We transfer this capability to your team so you can extend tests as your platform evolves.

In managed support engagements, Oblytech runs your tests as part of ongoing platform operations. We monitor test results, investigate failures, update tests when your platform changes, and provide guidance when false positives or missing test coverage is identified. This model works well for teams without dedicated testing resources or where specialist expertise is needed to diagnose complex test failures.

Common Testing Patterns and Entry Points

Request fulfillment testing is a frequent starting point. Build tests that submit requests of each type, validate that the right approvals trigger, and verify that fulfillment produces the expected records. These tests catch workflow changes that break request processing.

Integration testing validates that external system calls work correctly. Build tests that trigger outbound API calls, verify that ServiceNow receives the response correctly, and that error handling works if the external system is unavailable. These tests often uncover credential issues, API changes or timeout problems before users experience them.

Upgrade testing uses the Automated Test Framework to validate that platform upgrades do not break your customizations. Run tests before upgrade, run them again after upgrade, and compare results. This identifies compatibility issues early when fixing them is faster than after production is broken.

Change testing verifies that configuration changes work as intended. Before deploying a new business rule, approval workflow or field change to production, run tests that exercise the change in staging. This catches logic errors or unintended side effects before users see them.

Best Practices for Long-Term Test Maintenance

Tests must be maintained as your platform evolves. When you rename a field or change a form layout, tests that interact with those elements will fail. Design tests to be resilient to minor changes: use field labels instead of field IDs where possible, and use stable navigation paths rather than expecting specific form layouts.

Document test purpose and expected outcome clearly. If a test fails six months later, you need to know what it was supposed to validate. Include notes about why this particular workflow justifies testing, so future maintainers understand the value.

Version control your tests alongside your platform code. When you deploy a platform change, deploy the updated tests in the same release. This ensures tests stay synchronized with the platform state.

Choosing which part of the platform the test suite should protect first

A test framework is only as useful as the choice of what it covers first. Teams that try to automate every flow on the instance often end up with a suite that is slow, fragile and ignored over time. A better starting point is to name the handful of workflows whose failure would stop money, access or regulated records from moving, and build the first tests around those. Everything else can follow once the suite has a track record and a maintainer who knows which failures are real.

A first-wave selection table

Candidate area Why it deserves early coverage Reason to wait
Approval routing for high-value requests A broken route is silent and expensive to unwind None, unless the approval rules are still changing
Access-sensitive record views A visibility regression is a data exposure, not a cosmetic fault None; these are often the first to add
Integration round trips to a key system Failures appear in the other system, far from the change that caused them The endpoint is still under construction
Cosmetic layout and wording Easy to see, low consequence Often better checked by people than by scripts
Reports still being redesigned Expected output is not yet fixed Wait until the report definition is agreed

Procedure for setting up the first suite

  1. List the workflows the business would notice within a day if they stopped, and rank them by the cost of failure rather than the frequency of use.
  2. For the top few, write the expected outcome in one sentence each, including the record state that proves success.
  3. Decide which data each test needs and how it will be created and removed, so tests do not depend on records someone else is editing.
  4. Build the tests for one workflow end to end before starting the next, and run them several times to find ones that fail for reasons unrelated to the platform.
  5. Agree who investigates a failure and how quickly, before the suite starts blocking anything.

What usually goes wrong with a suite that was built too fast

A typical failure is a suite that passes in isolation and fails in the shared test environment because tests create records with the same names, or because one test relies on a setting another test changes. These failures train people to ignore red results, which is one of the most damaging outcomes a test suite can produce. Unique test data per run and an explicit cleanup step are the simplest protections, and they cost little to add at the start.

The second failure is coverage that looks complete on a dashboard but tests trivial paths. A count of tests says little about whether the approval route for the most expensive request has any test at all. Mapping each test to a named workflow makes the gaps visible.

Signs the suite is earning its keep

A working suite catches regressions before users do, and its failures lead to a fix within the same release cycle rather than a debate about whether the test is right. Track whether failures are found before release, how often a red result turns out to be a test defect, and how long the team spends maintaining tests compared with the platform changes they follow. Rising maintenance time with flat detection is the signal to prune the suite.

The metrics guide sets out how to measure those signals without over-reading them, and the governing automated testing note sets out who owns the decisions when the numbers disagree.

When a full automated suite is the wrong investment

If the platform changes rarely, the workflows are simple and the release team is already checking them manually with confidence, an automated suite may cost more to keep than it saves. The same is true where the core process is still being designed, because tests will be rewritten faster than they protect anything. In those cases, a short manual checklist tied to the highest-risk workflows is the better tool, and automation can be added once the process stops moving.

Setting the wider direction is the job of the governance model, and the implementation roadmap shows the order in which the first suite fits into a larger program.

How many tests should the first release contain?

Enough to cover the top-ranked workflows, with each one tested along its main route and its most important failure path. Adding volume for its own sake is a common way to create maintenance without protection.

Should tests run on every change?

Run the fast, high-value set on every change where the pipeline allows it, and run the broader set on a schedule or before a release. Keep the split documented so nobody mistakes a partial run for full coverage.

Who should own a failing test?

The owner of the workflow the test protects, with the test author supporting the investigation. A test with no owner tends to be disabled the first time it fails.

What counts as a good first test?

One that protects a workflow the business would notice, runs reliably in a clean state, and gives a failure message that points to the broken step.

ServiceNow automation testing starts with one workflow, one test and a clear pass condition

To automate testing on ServiceNow, choose one workflow that people run often and whose failure would hurt, then write it as a short sequence of steps the framework can replay. The test passes only when a named record reaches the state you expected, not when a page loads without error.

A first test for a request workflow usually looks like this:

  • Submit the request as a requester, using fixed test values.
  • Confirm the approval task is created for the expected approver and for no one else.
  • Approve the task and confirm the fulfilment task is created in the right assignment group.
  • Check the request state, then remove the test records.

Each step should describe something a person would do, such as opening a table or entering a value in a field. Refer to fields by their labels where you can. A label rarely changes during a release, while a form layout often does. A single test that covers submission, approval, fulfilment and notification will fail for several different reasons, and nobody will know which one to fix first.

Automated tests answer a different question from other checks, so each one has its place:

Check type Best for Weak at
Automated functional test Repeating an approval or fulfilment path after every change Judging whether wording or layout reads well
Manual user acceptance Confirming the process matches how people actually work Repeating the same path quickly on every release
Scripted check on one business rule Logic that calculates a value or filters records Showing how the change behaves through the interface

The most common mistake is asserting on the screen instead of the data. A test that confirms a success message appeared will stay green while the routing behind it breaks. Check the record itself: the task exists, it sits with the right group, and its state matches the step you just took. This also catches the quieter failure where the record is created but never assigned. Use the upgrade testing and acceptance checklist to decide which records each release must prove.

Fix an informal release process first, since a suite can only verify changes that reach its environment. Teams wanting an outside view on which workflows to cover first can ask for quality assurance support.

Frequently asked questions

Which workflows should we prioritize for automated testing?

Start with workflows that are executed frequently, have high business impact if they fail, and change rarely. Request fulfillment, critical integrations, and subscription renewals are typical priorities. Avoid testing functionality that changes frequently because the test maintenance cost will outweigh the benefit.

How do we handle tests that fail because of timing or external system delays?

The Automated Test Framework includes wait conditions that pause the test until a condition is met. Use these instead of fixed delays. If an external system is slow, configure the wait condition with a reasonable timeout and build error handling into your test so it does not fail when the external system is legitimately slow.

Can we integrate automated tests into our deployment pipeline?

Yes. Configure your deployment process to run tests in staging before production deployment. If tests fail, the deployment stops. This prevents broken changes from reaching production. Some teams also run tests after production deployment as a validation step that the deployment succeeded.

Talk to Oblytech

Planning, running or fixing a ServiceNow programme? Tell us where you are and we will suggest a sensible next step.

Contact us