The Now Platform® Washington DC release is live. Watch now!
Automation is the name of the game for streamlining your organization's processes, and adopting the ServiceNow platform is the first step to transforming your business.
So we have to ask - are you still condemning one of your employees to sit and perform tests manually, over and over, each time you've modified forms or upgraded your instance? Or are you the poor soul stuck with that task?
By setting up automated testing that you can reuse and modify, you take the error-prone human factor out of the loop. The Automated Test Framework (ATF) allows you to create and run automated tests on your ServiceNow instance to confirm that the instance still works as designed after being upgraded or modified. In this installment of our NOWSupport best practices series list, the following best practices will help you leverage the power of ATF.
But first, if you want to understand the basics of ATF, check out this video on our NowSupport YouTube channel:
And now, within the guiding principle of Always safeguard your production instance comes our first best practice:
This best practice goes hand-in-hand with why you shouldn't develop on your production instance. You may be tempted to run a quick test on your production instance to verify a minor change, but never succumb to that urge. Why? Here are a couple scenarios:
We recommend that you always configure an Impersonate step as the first step in your test. To do this, select Impersonate as the first test step, and specify the user to impersonate. In doing so, you can ensure that the test user has the required roles and behaves like that specific user.
Why bother to employ this step if you run the test as the test designer user? Because your test could break if someone changes the test designer user roles, or disables the test designer user. Or, you may find that the test can't access a record or form properly based on the correct user roles. Setting up an impersonate step helps you avoid all these pitfalls.
What causes ATF tests to fail? There are several possible root causes for this, including the tester failing to open the Client Test Runner, logging out of the session, or clearing the browser history on another tab, which affects all tabs. But inadequate central processing unit (CPU) power due to browser "throttling" is often at fault. Our previous best practices post, How to avoid ATF Testing Failures, gives you the lowdown on this issue.
When creating a test for a form, you may be tempted to take shortcuts and only set the form's required fields, or fields that you've edited. We recommend setting form fields critical to your business process, so that every time you run the test you're verifying these fields.
A field must be present on the form in order to set it with Set Field Values.
And finally, here's a shout out to the Test Logs and Test Transactions that provide a treasure trove of information for troubleshooting. Check them first before contacting customer support — the reason why a test is failing is probably recorded in one of these lists.
These are easy to find. After running your test, click Go to Result and the Test Results page displays.
Ready to get started with ATF? In this video, we show you how to set up your first ATF test:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.