Challenges with Manual Testing in ServiceNow

In most cases, people start with manual testing in ServiceNow. Over time, as implementation scope increases, they end up with a huge number of manual test cases, which are very difficult to maintain and execute as a part of regression testing for every small change or build deployment. Manual testing is unreliable as there is no standard process or criteria to validate if the expected result and the actual results have been compared. In this testing, testers may have too many tasks to complete. They may get tired and not be as attentive, therefore, unexpected errors or mistakes can happen while setting inputs. Manual testing is also time-consuming. According to a study, 90% of all IT projects are delivered late due to manual testing.

Automating the ServiceNow Testing Process

Automation is the best solution for the challenges highlighted above. Automation testing is part of every project where we need to increase productivity and accelerate the build release time. It is important to identify and define the roadmap for transforming your testing process from manual to automated. Start your journey with converting the most essential manual tests into automation which will add value. ServiceNow provides its own tool for automation, ATF, which helps to automate tests. Tests can be scheduled in batches(suite).

What is ServiceNow Automated Test Framework?

Automation Testing is a software testing technique where we use specialized tools for the execution of tests and compare the actual results against the expected results. ServiceNow came up with Automated Test Framework (ATF). This out-of-box application allows developers and testers to test the functionalities in ServiceNow itself rather than third-party tools to test ServiceNow. It basically gives you the tools to create and run automated tests on your ServiceNow non-production/Production Instances which requires installing a special ATF Plugin to access the application. As we all know, ServiceNow comes up with different versions. In that case, ATF might break your system or some of your customizations. It is better to test something before you upgrade to the production environment. ATF provides functional testing that allows actions such as creating users, impersonating users, creating records, setting field values, and validating them. If a test fails, ATF indicates that the result doesn’t meet the expected criteria and provides details of the failed step. Runtime screenshots are included in the test results to monitor and debug any issues. The ATF plugin is free with the Now Platform and uses the same development tools with which the developers are familiar.

Why use ATF in ServiceNow?

ATF reduces upgrade and development time by replacing manual testing with automated testing. It is used to verify and validate application functionalities, test end-to-end scenarios, server-side scripting test, configurations, customizations, and many more. Since the tests are automated, they are performed exactly the same way every time you run them and avoid user error. ATF is independent of UI, so the tests do not break when the UI changes, which is a common issue with third-party testing tools. It delivers a quality product with ServiceNow and promotes confidence in your platform stability.

The best part of ATF is you can schedule tests to run during off hours. You can run the entire test suite and then analyze the result later to determine if any changes are required. Suppose the test is executed successfully without any failure. In that case, you can use the same test for your next release or update if you keep the test in sync with the configurations and customizations. ATF is intended to test the changes you make to your instance and not the ServiceNow functionality.

 

Check out the video for more details:

 

 

The ATF application in ServiceNow is given below:

 

 

Components of ATF

Tests: Test is used to create test cases where we can perform or create test steps. In a test, you can click on “Add Test Step” and create a step accordingly. Creating a test once and adding changes to the new feature you want to test will be minimal. You can copy any existing tests or modify and reuse them.

 

Test Suites: It is basically a collection of test cases. You can organize the tests into test suites that can run together. Use an existing test suite or create a test suite and attach (existing) tests. The same tests can be grouped into multiple test suites. Attentively plan your tests and suites to optimize your testing.

 

Quick Start Test: ServiceNow provides pre-built tests and test suites with demo data. Use quick start test as a template to build your own tests and test suits.
Test Results: After running any test, the test result is stored in test results. Use test results for identifying failures or issues and the test logs to see more details about test results.
Suite Results: After running any test suite, the result of that suite is stored in test suites.
Schedules: We can run a test by scheduling it according to our preferred time.
Client Test Runner: If the test includes steps that involve any forms or UI, then those test steps run in a browser or window in the client test runner. Tests can manually start a client test runner or select an existing client test runner.
Properties: Before starting automation testing, make sure the required properties are enabled. You can also enable screenshots for all the running steps or only for failed steps according to your preference.
Step Configuration: It can only run when the test designer adds them to the test steps. Step configuration is a record in the test step. It allows users to create a user, impersonate, etc.

 

Benefits of Using ATF

It replaces manual testing with automation.
You can design tests once and reuse them. Tests can run at any time required.
Automation reduces human errors.
It helps to accelerate the testing process.
It allows for rollback of inserted records. If you create a record in ATF, it will be rolled back (i.e., you will not find that record in ServiceNow).
The tests can be rescheduled and run on the weekends.
Test Suites can be created.
ATF increases the quality of client deliverables.