OBLYTECH Logo
OBLYTECH Logo
ServiceNow Automated Test Framework Automation Opportunities

ServiceNow Automated Test Framework Automation Opportunities

High-Value Test Automation Scenarios

Automated Test Framework (ATF) shines for regression testing: validating that existing functionality still works after changes. When developers modify incident workflows, regression tests confirm that incidents still create correctly, assign properly, and escalate appropriately.

Where automation pays back: A manual regression run across many scenarios takes a long time, while the same run as an automated test finishes far faster. Multiply by the number of times developers need this regression testing (daily or multiple times per week) and the time savings are substantial. Guardrails: Not all tests should be automated. Complex user experiences, visual design validation, and user experience testing require human judgment.

Business process tests are ideal for ATF. Create an incident with specific data, verify it routes correctly, confirm SLA is set, validate notification is sent. These workflows are repeatable and well-defined.

Test Coverage Strategy

Do not try to automate all testing. Prioritize: (1) Business-critical workflows (incidents, changes, requests), (2) frequently-used workflows (ticket creation, assignment, escalation), (3) high-risk areas (integrations, data imports, complex scripts), (4) workflows that change frequently (high regression risk).

Typical coverage: most testing automated for business-critical processes, a moderate portion for standard processes, and selective automation for edge cases and exploratory testing. Full automation is not the goal; sustainable automation that provides good coverage without excessive maintenance burden is better.

Maintenance Burden and Test Evolution

Automated tests require maintenance. When workflows change, tests must be updated. A test that validates field order in a form breaks when the form is redesigned. Test maintenance is an ongoing cost. When calculating the value of automation, factor in maintenance effort.

What good looks like: automated tests are maintainable. Test data is created fresh for each run (not relying on data from previous runs that might have been deleted). Tests are independent (if one test fails, it does not break other tests). Human approval points: validate what the test does before executing automated approvals or deletions. Automated testing should reduce manual effort, not remove human oversight of high-stakes decisions.

Test Data and Test Environment Management

Automated tests need stable test data. If a test creates an incident and expects the incident to be assigned to a specific queue, the queue must exist in the test environment. Test data setup is often the bulk of the work in test automation. Invest in good test data management: seed the test environment with realistic data, clean up test data after each test run so the environment stays stable.

Guardrails: Use test data that does not interfere with production. Never run automated tests against production data. Maintain a separate test instance and refresh it regularly so test data does not drift from reality.

Integration with CI/CD Pipeline

ATF tests can be triggered automatically when code is committed. Every time a developer commits a change, automated tests run and give immediate feedback. This is powerful for catching regressions early.

Configure tests to run in the CI/CD pipeline: commit code, trigger build, run automated tests, deploy to staging if tests pass. Fast feedback loop (tests run in minutes) is key. Slow tests that run for hours reduce their value.

Knowing When to Escalate Testing

Automated tests should run in minutes to hours. If tests take longer, they are too complex or need optimization. Tests that require human intervention (manual setup, approval) are not suitable for full automation. These should be manual tests or semi-automated (automation does setup, human validates result).

Test Metrics and Maintenance

Track test coverage (what percentage of workflows are automated), test execution time (how long tests take to run), and test maintenance effort (how much time is spent updating tests). Tests that take hours to run are not used frequently; optimize or remove them. Tests that require constant maintenance may not be worth automating. Use metrics to guide investment decisions.

Telling a worthwhile automation candidate from a test that will rot

Many automation programs do not fail because the tests cannot be written. They fail because the candidates were chosen for how easy they were to script rather than for what they protect. A scenario that is simple to automate but seldom changes, or that depends on a screen layout likely to move, produces a steady cost with little return. The useful question for each candidate is what it would cost the business if it broke unnoticed for a week, and how often the platform underneath it is expected to change.

A decision grid for each candidate scenario

Scenario trait Points toward automating Points away from automating
Failure consequence Silent failure that reaches customers, money or regulated records Visible failure that someone fixes the same day
Change frequency Stable logic that changes in planned releases Logic still being designed or edited weekly
Test data Data can be created and removed by the test Data depends on a live record another team owns
Dependency on user interface Checks at the data or service level Checks that depend on pixel positions or layout
Run frequency Runs on every change or nightly Runs once a year, when a manual check is cheaper

Procedure for building the candidate list

  1. Take the workflows already ranked by business consequence and split each into the steps a tester would check by hand.
  2. Score each step against the grid above and mark the ones that fall on the automate side of most rows.
  3. Check each candidate against the platform change calendar, so that planned changes to the same area are known before a test is written.
  4. Identify the data each candidate needs and whether it can be created with a known state.
  5. Write the expected outcome for each accepted candidate, including the record state a passing run must leave behind.
  6. Record the rejected candidates and the reason, so the list is not rebuilt from scratch the next time someone asks.

Maintenance is the cost that decides the program

Every automated test adds a small permanent load. It must be updated when the workflow changes, its data must be kept valid, and its failures must be investigated. A reasonable rule is that no new candidate is added until the owner of the existing suite can say who maintains each test and how a failure is handled. That discipline matters more than the number of tests delivered.

Tests that run for a long time are also used less. If the suite takes long enough that people stop running it locally, the candidates have been chosen badly or are not being maintained. Splitting slow end-to-end checks from fast data-level checks keeps the feedback loop short for developers.

Where automation should not be extended

Some areas are better left to structured manual testing, at least for now. Usability judgments, the wording of user messages, and the first look at a new screen are hard to script and easy for a person to spot. Exploratory testing of a process that is still changing also uncovers problems no scripted candidate would have listed. Automation is most useful after those questions are settled, when the aim is to stop regressions rather than discover new design issues.

For the link between candidate selection and integrations, the integration patterns guide covers how integrations are structured across business units, and the governance note on automated testing explains who decides on automated tests and who maintains them.

Candidates that sit in the middle of the grid need a tie-break. Ask whether a failure would be noticed by a person in the same working day. If it would, a manual check tied to the release is often enough, and the automation effort is better spent on a silent failure elsewhere. If it would not, the candidate moves up the list, provided its data can be controlled. Writing that reasoning beside each accepted and rejected candidate is what allows the list to be defended when priorities change.

Should we automate the regression tests first?

Often yes, because they are repeated and their expected results are known. Check that the regression set reflects the current workflows, not the ones from two releases ago, before automating it.

Is it worth automating a rarely used report?

Only if a silent failure would reach a decision. A rarely used report that a manager checks once a quarter is often better covered by a documented manual check at that point.

What do we do with a candidate that keeps failing for reasons unrelated to the platform?

Fix its data dependency first. If the failures continue, remove the test rather than leaving it red, and record why so it is not re-added without the fix.

Who approves a new automation candidate?

The owner of the workflow it protects, with the team that maintains the suite confirming that they can support it.

Frequently asked questions

Should we automate tests before or after the feature is built?

After. Build the feature first, manually test it to confirm it works, then automate the test. Automating before the feature exists means writing tests against unknown behavior. Test-driven development (write tests before code) is different—it is about specifying behavior via tests. In ServiceNow, typically you build first, then automate regression tests.

How often should automated tests run?

Frequently. Run tests after every commit (CI/CD integration), nightly, and before production deployments. The more feedback developers get, the earlier they catch regressions. Prioritize critical tests to run on every commit; lower-priority tests can run nightly.

What if an automated test is flaky (sometimes passes, sometimes fails)?

This is a red flag. Flaky tests destroy confidence in automation. Debug the flakiness: is the test waiting long enough for async operations, is test data inconsistent, is the test timing-sensitive? Fix the flakiness before adding the test to regular CI/CD runs. A flaky test that is run in CI/CD creates noise and reduces engineer trust in test results.

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