How to test Businesss rules in Automated test Framework

kvamsikrishna
Mega Expert

Hi Experts

we upgraded my instance from FUJI to ISTANBUL. i want to test these below in Automated test framework

  1.BUSINESS RULES

  2.UI ACTIONS

  3.CLIENT SCRIPTS

  4.NOTIFICATION EMAIL SCRIPT

  5.TABLES

  6.FIELDS

  7.UI POLICIES

  8.GROUPS

  9.NOTIFICATIONS

  10.SCRIPT INCLUDES

Can we test those in automated test framework or not ?

in those which we can test in automated test framework ?@

I don't now exactly can we test those in ATF or not ?

if possible to test even some in ATF, How can we test ?

can u pls explain step by step how to add steps ?

Thanks

Vamsi krishna

ctomasi

3 REPLIES 3

Chuck Tomasi
Tera Patron

Hi Vamsi,



ATF is used for testing functional testing. "When I do this, does that other thing happen as expected?" Consider it like a robot with pre-recorded instructions of what to test and what to expect. As a result, you are testing most of what is in your list as a result. If the field goes from A to B, then you can use an assertion to test that it is B. If not, your test fails. If that value change happened to be done by a business rule, that would validate your business rule is running properly.



I hope that helps.



https://docs.servicenow.com/bundle/istanbul-release-notes/page/release-notes/servicenow-platform/aut...


kvamsikrishna
Mega Expert





ctomasi


Ask yourself "Functionally... what is the purpose of this script? When does it run? What does it do once it runs? How can I test that?"



FWIW, it appears you have a single IF statement at the top of your block of code and no condition. That means this script is going to load every time. To improve debugging, consider moving the conditional part to the Condition statement.



Condition: current.u_is_recjected_worknote_updated == false



and then you script would start with



currrent.u_journal...