---
schema_version: "1"
id: d59514fd09e2c81820a284625352a65cbd7f9ee10fd09232a0d639a4364046d2
title: Create an Example Test Procedure (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_create_an_example_test_procedure.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_create_an_example_test_procedure.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1024c5977778d176f24ea6834d369c85b67948a282b8f2904e82e1f1489448f1
description: For the managed package runtime, after you mock a response in the Integration Procedure to be tested, create the Test Procedure that tests a calculation it performs.
products:
  - Omnistudio
release: "264"
---
# Create an Example Test Procedure (Managed Package)

For the managed package runtime, after you mock a response in the Integration Procedure to be tested, create the Test Procedure that tests a calculation it performs.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

The Test Procedure has these components:

- A Set Values component, named IPInput
- An Integration Procedure Action component, named TestIP
- An Assert Action, named AssertTotal
- A Response Action, named TestResponse

A Response Action isn't required, but it's useful for testing the Test Procedure. After you have verified that the Test Procedure works, you can deactivate or delete it.

The Structure panel looks like this:

![Structure panel with Procedure Integration, IPInput, TestIP, AsserTotal, and TestResponse actions](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/iptest1structure.png)

To create the Test Procedure:

1. From the Vlocity Integration Procedures tab, click **New**.
2. Provide an **Integration Procedure Name**, a **Type**, and a **SubType**, and click **Save**.
3. Scroll to the bottom of the Procedure Configuration and check **Is Test Procedure**.
4. Drag a Set Values component into the Structure panel and give it the following settings:
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col>
              <col>
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d143757e145">
                  <p style="margin-bottom:0;">Property</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d143757e151">
                  <p style="margin-bottom:0;">Value</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e145 ">
                  <p style="margin-bottom:0;">Element Name</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e151 ">
                  <p style="margin-bottom:0;">IPInput</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e145 ">
                  <p style="margin-bottom:0;">Element Value Map: Price</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e151 ">
                  <p style="margin-bottom:0;">250</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e145 ">
                  <p style="margin-bottom:0;">Element Value Map: State</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e151 ">
                  <p style="margin-bottom:0;">NY</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e145 ">
                  <p style="margin-bottom:0;">Response JSON Node</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e151 ">
                  <p style="margin-bottom:0;">IPInput</p>
                </td>

              </tr>
            </tbody>
          </table>
5. Drag an Integration Procedure Action component into the Structure panel and give it the following settings:
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col>
              <col>
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d143757e243">
                  <p style="margin-bottom:0;">Property</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d143757e249">
                  <p style="margin-bottom:0;">Value</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e243 ">
                  <p style="margin-bottom:0;">Element Name</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e249 ">
                  <p style="margin-bottom:0;">TestIP</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e243 ">
                  <p style="margin-bottom:0;">Integration Procedure</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e249 ">
                  <p style="margin-bottom:0;">Name you gave the Integration Procedure to be tested, described in
                    <a href="https://help.salesforce.com/s/articleView?id=xcloud.os_define_execution_logic_using_conditional_blocks.htm&amp;release=264.0.0&amp;type=5" title="For the managed package runtime, a Conditional Block executes in its entirety if an expression is true, executes one of a set of mutually exclusive conditions defined in the steps it contains, or both.">Define Execution Logic Using Conditional Blocks (Managed Package)</a>. <span>If
                      you downloaded the DataPack, the name is
                      <strong class="uicontrol">Documentation_IPCondBlock1</strong>.</span>
                  </p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e243 ">
                  <p style="margin-bottom:0;">Send JSON Path</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e249 ">
                  <p style="margin-bottom:0;">IPInput</p>
                </td>

              </tr>
            </tbody>
          </table>
6. Drag an Assert Action component into the Structure panel and give it the following settings:
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col>
              <col>
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d143757e340">
                  <p style="margin-bottom:0;">Property</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d143757e346">
                  <p style="margin-bottom:0;">Value</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e340 ">
                  <p style="margin-bottom:0;">Element Name</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e346 ">
                  <p style="margin-bottom:0;">AssertTotal</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e340 ">
                  <p style="margin-bottom:0;">Assert Conditional Formula</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e346 ">
                  <p style="margin-bottom:0;">TestIP:Output:Total == 265</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e340 ">
                  <p style="margin-bottom:0;">Assert Failure Message</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e346 ">
                  <p style="margin-bottom:0;">Calculation is incorrect.</p>
                </td>

              </tr>
            </tbody>
          </table>
7. Drag a Response Action component into the Structure panel and give it the following settings:
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col>
              <col>
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d143757e423">
                  <p style="margin-bottom:0;">Property</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d143757e429">
                  <p style="margin-bottom:0;">Value</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e423 ">
                  <p style="margin-bottom:0;">Element Name</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e429 ">
                  <p style="margin-bottom:0;">TestResponse</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e423 ">
                  <p style="margin-bottom:0;">Return Full Data JSON</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d143757e429 ">
                  <p style="margin-bottom:0;">(checked)</p>
                </td>

              </tr>
            </tbody>
          </table>
    
    After you have verified that the Test Procedure works, you can deactivate this component.
8. Go to the Preview tab and click **Execute**. The output should look like this:
    
    ```
    {
      "response": {
        "testResult": "success"
      },
      "TestResponseStatus": true,
      "AssertTotal": {
        "assertFailureMessage": "Calculation is incorrect.",
        "variableData": {
          "TestIP:Output:Total": 265
        },
        "assertConditionalFormula": "TestIP:Output:Total == 265",
        "assertResult": true
      },
      "AssertTotalStatus": true,
      "TestIP": {
        "testResult": "success",
        "Output": {
          "Price": 250,
          "State": "NY",
          "Tax": 15,
          "TaxRate": 6,
          "Total": 265
        }
      },
      "TestIPStatus": true,
      "IPInput": {
        "Price": 250,
        "State": "NY"
      },
      "IPInputStatus": true,
      "options": {
        "useQueueableApexRemoting": false,
        "queueableChainable": false,
        "ignoreCache": true,
        "resetCache": false,
        "chainable": false
      }
    }
    ```
9. (Optional) In the IPInput component, change the Price, or change the State to WA, OR, NV, or CA. Then return to the Preview tab and click **Execute** again. Note how the output changes.
10. To prepare for [running the Test Procedure](https://help.salesforce.com/s/articleView?id=xcloud.os_run_test_procedures.htm&release=264.0.0&type=5 "For the managed package runtime, the Test dashboard lets you run Test Procedures (Integration Procedures that perform unit tests) and analyze the results of the tests."):
    
    1. In the TestResponse component, click **Active** to remove the check.
    2. In the Procedure Configuration, click **Activate Version**. IDX Workbench only runs active Test Procedures.