{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1679,"path":"application-development/automated-test-framework-atf/atf-biz-rule-use.md","title":null,"bundle":null,"doc_type":null,"release":null,"body":"---\ntitle: Automated Test Framework use case: test a business rule\ndescription: This use case illustrates testing a business rule with the Automated Test Framework.\nlocale: en-US\ncanonical_url: https://www.servicenow.com/docs/r/australia/application-development/automated-test-framework-atf/atf-biz-rule-use.html\nrelease: australia\nproduct: Automated Test Framework \\(ATF\\)\nclassification: automated-test-framework-atf\ntopic_type: task\nlast_updated: \"2026-03-12\"\nreading_time_minutes: 1\nbreadcrumb: [Automated Test Framework use case examples, Automated Test Framework \\(ATF\\) reference, Automated Test Framework \\(ATF\\), Testing and debugging applications, Building applications]\n---\n\n# Automated Test Framework use case: test a business rule\n\nThis use case illustrates testing a business rule with the Automated Test Framework.\n\n## Before you begin\n\nRole required: atf\\_test\\_admin\n\n## About this task\n\nThis example tests a business rule that sets the value of **Locked out** to **true** when **active** is set to **false**.\n\n\\[Omitted image \"atf-biz-rule-use-small.png\"\\] Alt text: Test steps\n\n## Procedure\n\n1.  Impersonate a user with the necessary permissions.\n\n    In this example, the step impersonates the admin user.\n\n    \\[Omitted image \"atf-use-biz-rule-01.png\"\\] Alt text: Form for Impersonate\n\n2.  Open a form for the table to which this business rule applies.\n\n    This example opens a new User form.\n\n    \\[Omitted image \"atf-use-biz-rule-02.png\"\\] Alt text: Form for Open a New Form\n\n3.  Set values on the form that meet the requirements for submitting the form and for triggering the business rule.\n\n    This example sets values for the **Active**, **Last name**, and **First name** fields.\n\n    \\[Omitted image \"atf-use-biz-rule-03.png\"\\] Alt text: Form for Set Field Values\n\n4.  Submit the form.\n\n    \\[Omitted image \"atf-use-biz-rule-04.png\"\\] Alt text: Form for Submit Form\n\n5.  Validate that the business rule ran.\n\n    In this example the business rule tested sets **Locked out** to **true** if **Active** is set to **false**.\n\n    \\[Omitted image \"atf-use-biz-rule-05.png\"\\] Alt text: Form for Field Values Validation\n\n\n**Parent Topic:**[Automated Test Framework use case examples](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/automated-test-framework-atf/atf-use-cases.md)\n\n"}}