ServiceNow has released its latest version, Istanbul, which introduces a game changing innovation for the platform—Automated Test Framework to provide regression testing.

The Automated Test Framework will drastically simplify future upgrades as customers will be able to have a high level of confidence in testing releases prior to upgrades quickly and efficiently. This will allow customers to stay in-sync with the latest releases from ServiceNow without fear of broken functionality adversely impacting their business processes.

What is the Automated Test Framework?

The Automated Test Framework is a module within ServiceNow that allows customers to define their own tests against any other ServiceNow module, including bespoke modules developed in-house or by third-parties such as JDS.

Tests can be reused in test suites to provide comprehensive coverage of a variety of business processes. In this example, a test has been developed to verify that critical incidents are properly identified in the upgraded version. Notice how each step contains a detailed description of what the test will do in plain English.

Be sure to always include a validation step!

Opening a form, setting values, and successfully submitting that form is not enough to ensure a test is successful. The key to a successful regression testing is to have a point of validation, or confirmation that the test has produced the expected outcome. In this case, validating that the priority of the incident has been set to critical.

When defining test steps, ServiceNow will walk you through a wizard that will show you all the possible automated steps that can be undertaken. Note that ServiceNow will automatically insert this next step after the last step, unless you specify otherwise.

The automated framework can open new or existing records and undertake any action an end-user would normally complete.

Also, note how it is possible to run automated regression tests directly against the server and not just through a regular ServiceNow form.

Be careful when defining server tests as, ideally, automated regression tests should be run through a form, mimicking a transaction undertaken by an actual user. This ensures UI policies and actions are all taken into account in the test results. Tests conducted directly against the server will include business rules, but not UI scripts/actions, which may lead to inconsistent results.

Server tests are ideal for testing integration with third-party systems via web services.

Test results include screenshots so you can see precisely what occurred during your test run. Also, notice that the test has been run against a particular browser engine, and the overall time for the entire process has been captured.

 

 

The individual runtime of each step can be eye-balled from the start-time, although it is possible to have this automatically calculated if need be.

Please note, whether you are creating a new record or modifying an existing record, the results of your automated regression test will NOT become part of that particular table’s records. For example, if you insert an new incident, you will see screenshots of the new incident complete with a new incident number, but if you go to the incident table, it won’t be present. If you update an existing incident, the update will be visible in the test results, but the actual record in the table will not change.

When it comes to best practices, JDS recommends structuring your tests carefully to ensure your coverage is comprehensive and represents an end-to-end business transaction, taking into account the impact on workflows.

If you have any questions about Automated Test Frameworks in ServiceNow, please contact JDS.

 

Leave a Reply