---
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 Test API - ServiceNow Fluent

# Automated Test Framework Test API - ServiceNow Fluent {#ariaid-title1}

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

The Automated Test Framework Test API defines automated tests \[sys_atf_test\] that you can run to confirm that your instance works after making a change.
For general information about Automated Test Framework tests, see [Automated Test Framework (ATF)](https://servicenow-prod.fluidtopics.net/x4Tg~gX3EeFqtF9ohWlMNQ "The Automated Test Framework (ATF) enables you to create and run automated tests to confirm that your instance works after making a change. For example, after an upgrade, during application development, or when deploying instance configurations with update sets. Review failed test results to identify the changes that caused the failure and the changes that you should review.").  
Nota:  
The Automated Test Framework Test API supports only one-way synchronization. After defining an ATF test in source code, if the metadata is modified outside of the source code, those changes aren't synchronized and reflected in the source code.
**Conceitos relacionados**   

* [ServiceNow Fluent](https://servicenow-prod.fluidtopics.net/pP6OxbNArnr2tlBRkmrTfw "Define application metadata in source code using the ServiceNow Fluent domain-specific programming language.")

## Test object {#ariaid-title2}

Create an automated test \[sys_atf_test\] containing a series of steps to execute.
{#atf-test-object-now-ts__table_vy2_525_jq__entry__3}{#atf-test-object-now-ts__now-id-desc2}

| Name | Type | Description |
|-|-|-|
| $id | String or Number | Required. A unique ID for the metadata object. When you build the application, this ID is hashed into a unique sys_id. For more information, see [ServiceNow Fluent language constructs](https://servicenow-prod.fluidtopics.net/b1y7cW0gok5uzbNJ5JcSTw "ServiceNow Fluent language constructs provide additional functionality for development in source code with ServiceNow Fluent APIs."). Format: `Now.ID['String' or Number]` |
| name | String | A unique name for the test. |
| description | String | A description of what the test does. |
| active | Boolean | Flag that indicates whether the test is active. Valid values: * true: The test is active. * false: The test isn't active. {#atf-test-object-now-ts__ul_cxj_srr_4bc} Default: true |
| failOnServerError | Boolean | Flag that indicates whether to fail when a server error occurs during the test. Valid values: * true: The test fails when a server error occurs. * false: The test doesn't fail when a server error occurs. {#atf-test-object-now-ts__ul_sc1_5w2_ybc} Default: true |
| configurationFunction | Function | The steps of the test. Test steps are passed as statements within the atf function. For example: (atf) => { atf.form.openNewForm({ table: 'sn_example_table', formUI: 'standard_ui', view: '', }) } For more information about test steps, see [Supported test steps](https://servicenow-prod.fluidtopics.net/h1Ou1ImkbnNrfMnV9LVmVw#atf-test-object-now-ts__section_q5c_qmp_ccc). |
| $meta | Object | Metadata for the application metadata. With the installMethod property, you can map the application metadata to an output directory that loads only in specific circumstances. $meta: { installMethod: 'String' } Valid values for installMethod: * demo: Outputs the application metadata to the metadata/unload.demo directory to be installed with the application when the Load demo data option is selected. * first install: Outputs the application metadata to the metadata/unload directory to be installed only the first time an application is installed on an instance. {#atf-test-object-now-ts__ul_n3q_y3s_42c} |
| $override | Object | Fields and their values provided to configure fields that aren't included in a ServiceNow Fluent API or to override an existing field. Aviso: Type safety isn't enforced for fields configured with the $override property. $override: { field: value, ... } |
[Tabela 1. Properties]

{#atf-test-object-now-ts__table_vy2_525_jq}  
The output values of test steps with output variables can be saved as variables and used as inputs to other steps using the syntax `output.<output-variable>`. The output variables can be used both directly
as inputs on appropriate fields or inside of a template string, such as with `atf.server.log` in the following example.  

    import { Test } from '@servicenow/sdk/core'

    Test({
            active: true,
            failOnServerError: true,
            name: 'Simple example',
            description: 'An illustrative test written in fluent',
            $id: Now.ID[1],
        },
        (atf) => {
            atf.form.openNewForm({
                table: 'sn_table_app_reptile_table',
                formUI: 'standard_ui',
                view: '',
            })
            atf.form.setFieldValue({
                table: 'sn_table_app_reptile_table',
                formUI: 'standard_ui',
                fieldValues: {
                    reptiles: 'lizard' as any,
                },
            })
            const output = atf.form.submitForm({ assertType: 'form_submitted_to_server', formUI: 'standard_ui' })
            atf.server.recordValidation({
                recordId: output.record_id,
                table: 'sn_table_app_reptile_table',
                assertType: 'record_validated',
                enforceSecurity: true,
                fieldValues: 'reptiles=lizard',
            })
            atf.server.log({
                log: `Submitted record with sys_id: ${output.record_id} to table ${output.table}`
            })
        }
    )

### Supported test steps {#atf-test-object-now-ts__section_q5c_qmp_ccc}

The following test steps are supported. For information about step properties, see the [Automated Test Framework (ATF) test step categories](https://servicenow-prod.fluidtopics.net/n5V_QroxnnOjQBDTVsMXWg "Find test steps for a particular user interface or ServiceNow AI Platform feature.") documentation.  
Nota:  
Some fields available for test steps on forms aren't available as properties in ServiceNow Fluent.
{#atf-test-object-now-ts__table_uqw_2mp_ccc__entry__2}

| Category | Steps |
|-|-|
| [Application Navigator category](https://servicenow-prod.fluidtopics.net/14po~evBIJHjq_Q_LfojsQ#test-steps-app-navigator-category "Verify the functionality of menus and modules in the application navigator.") | * atf.applicationNavigator.applicationMenuVisibility * atf.applicationNavigator.moduleVisibility * atf.applicationNavigator.navigateToModule {#atf-test-object-now-ts__ul_dxm_cmp_ccc} |
| [Email category](https://servicenow-prod.fluidtopics.net/Kmh0PxYnRDbZ_F2aKEMUFw#test-steps-email-category "Use Automated Test Framework (ATF) to test email notifications, outbound email flows, and inbound email responses.") | * atf.email.generateInboundEmail * atf.email.generateInboundReplyEmail * atf.email.generateRandomString * atf.email.validateOutboundEmail * atf.email.validateOutboundEmailGeneratedByFlow * atf.email.validateOutboundEmailGeneratedByNotification {#atf-test-object-now-ts__ul_exm_cmp_ccc} |
| [Form category](https://servicenow-prod.fluidtopics.net/1JIEh08LgoXYVs_d_sj2Zg#test-steps-form-category "Validate the functionality of fields and UI actions on a form.") | * atf.form.addAttachmentsToForm * atf.form.clickDeclarativeAction * atf.form.clickModalButton * atf.form.clickUIAction * atf.form.declarativeActionVisibility * atf.form.fieldStateValidation * atf.form.fieldValueValidation * atf.form.openExistingRecord * atf.form.openNewForm * atf.form.setFieldValue * atf.form.submitForm * atf.form.uiActionVisibility {#atf-test-object-now-ts__ul_lxm_cmp_ccc} |
| [Forms in Service Portal category](https://servicenow-prod.fluidtopics.net/dFwBimbo2573HLSq8pFl6A#test-steps-forms-portal-category "Validate the functionality of fields and UI actions in Service Portal form widgets.") | * atf.form_SP.addAttachmentsToForm * atf.form_SP.clickUIAction_SP * atf.form_SP.fieldStateValidation_SP * atf.form_SP.fieldValueValidation_SP * atf.form_SP.openForm_SP * atf.form_SP.openServicePortalPage * atf.form_SP.setFieldValue_SP * atf.form_SP.submitForm_SP * atf.form_SP.uiActionVisibilityValidation_SP {#atf-test-object-now-ts__ul_fxm_cmp_ccc} |
| [Quick start tests for Dashboards](https://www.servicenow.com/docs/access?context=quick-start-tests-dashboards&version=australia&pubname=australia-now-intelligence&ft:locale=en-US) | * atf.reporting.responsiveDashboard * atf.reporting.responsiveDashboardSharing {#atf-test-object-now-ts__ul_hxm_cmp_ccc} |
| [REST category](https://servicenow-prod.fluidtopics.net/n8JUY2i2ELPQVBf~c3t6rQ#test-steps-rest-category "Verify the functionality of REST calls.") | * atf.rest.assertJsonResponsePayloadElement * atf.rest.assertResponseHeader * atf.rest.assertResponseJSONPayloadIsValid * atf.rest.assertResponsePayload * atf.rest.assertResponseTime * atf.rest.assertResponseXMLPayloadIsWellFormed * atf.rest.assertStatusCode * atf.rest.assertStatusCodeName * atf.rest.assertXMLResponsePayloadElement * atf.rest.sendRestRequest {#atf-test-object-now-ts__ul_ixm_cmp_ccc} |
| [Server category](https://servicenow-prod.fluidtopics.net/bpSg__8R1PKd6jhB44Sj_Q#test-steps-server-category "Perform server-side operations. For example, query and update a record, impersonate a user, or run a server-side script.") | * atf.server.addAttachmentsToExistingRecord * atf.server.checkoutShoppingCart * atf.server.createUser * atf.server.impersonate * atf.server.log * atf.server.recordDelete * atf.server.recordInsert * atf.server.recordQuery * atf.server.recordUpdate * atf.server.recordValidation * atf.server.replayRequestItem * atf.server.runServerSideScript * atf.server.searchForCatalogItem * atf.server.setOutputVariables {#atf-test-object-now-ts__ul_jxm_cmp_ccc} |
| [Service Catalog category](https://servicenow-prod.fluidtopics.net/lj~IYp3MmYSGaS2UR7rMhA#test-steps-service-catalog-category "Validate single catalog item transactions as well as requester and fulfiller flows in Service Catalog.") | * atf.catalog.addItemToShoppingCart * atf.catalog.openCatalogItem * atf.catalog.openRecordProducer * atf.catalog.orderCatalogItem * atf.catalog.setCatalogItemQuantity * atf.catalog.setVariableValue * atf.catalog.submitRecordProducer * atf.catalog.validatePriceAndRecurringPrice * atf.catalog.variableStateValidation * atf.catalog.validateVariableValue {#atf-test-object-now-ts__ul_kxm_cmp_ccc} |
| [Service Catalog in Service Portal category](https://servicenow-prod.fluidtopics.net/CYsxQYjb7bthhTDtij66Nw#test-steps-catalog-portal-category "Validate catalog item transactions and requester flows from Service Portal.") | * atf.catalog_SP.addItemtoShoppingCart_SP * atf.catalog_SP.addOrderGuidetoShoppingCart_SP * atf.catalog_SP.addRowToMultiRowVariableSet_SP * atf.catalog_SP.navigatewithinOrderGuide_SP * atf.catalog_SP.openCatalogItem_SP * atf.catalog_SP.openOrderGuide_SP * atf.catalog_SP.openRecordProducer_SP * atf.catalog_SP.orderCatalogItem_SP * atf.catalog_SP.reviewIteminOrderGuide_SP * atf.catalog_SP.reviewOrderGuideSummary_SP * atf.catalog_SP.saveCurrentRowOfMultiRowVariableSet_SP * atf.catalog_SP.setCatalogItemQuantity_SP * atf.catalog_SP.setVariableValue_SP * atf.catalog_SP.submitOrderGuide_SP * atf.catalog_SP.submitRecordProducer_SP * atf.catalog_SP.validateOrderGuideItem_SP * atf.catalog_SP.validatePriceAndRecurringPrice_SP * atf.catalog_SP.variableStateValidation_SP * atf.catalog_SP.validateVariableValue_SP {#atf-test-object-now-ts__ul_gxm_cmp_ccc} |
[Tabela 2. Test steps]

{#atf-test-object-now-ts__table_uqw_2mp_ccc}

