Automated Testing Framework (ATF) has always been a key topic around ServiceNow testing, especially for those keen in Quality Assurance. One of those people is Zherald, SPOC’s Security and QA lead who has a passion for Testing and making sure systems are safe and working as expected.
Zherald’s Introduction to ServiceNow’s Automatic Testing Framework
The ATF is a solution that saves time and frustration. It allows previously built test scenarios to be used many times. Previously, the only real option for ServiceNow was to use a 3rd party solution. Many of which were very expensive. ServiceNow has solved this issue by introducing the Automated Testing Framework module, available since the Istanbul release. Since its introduction to the Now Platform, ATF has been greatly improved and now offers a lot of help for performing Automated Testing. It offers flexibility, especially for MSP’s as they are easily transferable from one instance to another; using XML update sets. From a Quality Assurance (QA) perspective, there are some huge benefits:
- The possibility to create test suites, containing test cases that can be executed whenever they’re needed.
Great Feature: Running and executing the suites in a scheduled job. This means you may schedule the time when you want the tests to run in the future.
- Capturing screenshots when a defect is located. Very helpful to prove in which test case or element the test fails.
Assessing the Solution
We used the ATF for automating the testing for our internal tool Project Management Application, built on the Now Platform. The solution itself, as its name suggests, is used for project management and is utilised by various user groups – project managers, developers, testers, etc. The automation we have implemented is focused on the lifecycle of Agile Projects. This covers all components such as backlogs, sprints and stories. Another aspect we have managed to automate is the verification of forms. This applies to each project component and includes the presence of fields, their default values and attributes. Our test scenarios are divided into suites, each one covering the above-mentioned project component. Running an exemplary suite for the Sprint will trigger the following test to be executed:
- Sprint lifecycle including every possible Sprint state change.
- This scenario also verifies mandatory fields and button availability, as each may differ at various stages of Sprint lifecycle.
- Availability of fields and their attributes on a new Sprint form.
- Attributes include: mandatory fields, editability and default values.
- Availability of UI actions on new Sprint form.
As the ATF in ServiceNow has been introduced quite recently, we encountered some issues and bugs. These were not critical issues that made it impossible to use ATF, but we are looking for them to be resolved in the next ServiceNow releases.
One issue was the inability to populate journal fields (Additional Comments or Work Notes) that can be mandatory while changing states of records. In the latest London release, users of the ATF now have the possibility to automate Service Portal and Service Catalogue testing. In our eyes, this is a huge step towards making the ATF an important part of the Testing Arsenal.
With these features (and others coming in the following releases for sure!) Customers can benefit in numerous ways:
- Financially: well-designed automated tests are cheaper to maintain than using testers to perform manual tests Qualitatively: automated tests exclude the ‘human factor’ and potential mistakes or omissions related to the psychological state of the tester, their physical shape or even the weather outside
- Personally: Testers released from long and tedious regression testing can engage in activities that automation will never do – creating standards, test plans and so on. I can’t wait to see what’s next with this application and ServiceNow testing.