---
sourceDocument: Australia Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/application-development

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Automated Test Framework use case: test a script include

# Automated Test Framework use case: test a script include {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 min. de leitura

This use case illustrates testing a script include with the Automated Test Framework.{#atf-use-script-include__nfn_ptq_mx}  
To test a script include with the Automated Test Framework, create a test that performs these steps:

* a step that causes the system to execute the script include. Examples:
  * Run Server Side Script test step that calls the script include.
  * Form action step script -- such as open a form, submit or form, or set a field value -- that invokes the script include.
  {#atf-use-script-include__mmy_l54_jx}
* A step that validates that the script include took the expected actions. The specific test step for this validation depends on what the script include is designed to do. Examples:
  * Field values validation, if the script sets a field value
  * Field state validation, if the script changes a field state
  * Record Query, if the script generates a new record
  {#atf-use-script-include__lch_h54_jx}
{#atf-use-script-include__e3g_rvq_mx}

This example shows a test with one test step: Run Server Side Script. The script associated
with this test step calls a script include that returns the value of its argument plus three.
If the value returned from the script include is 8, the script include has worked
as intended and the test passes.
Figura 1. Automated Test to test a script include   

Figura 2. Automated test step for testing script include   

Figura 3. Script include to test with Automated Test Framework   


