--- title: "Create test case for export message" slug: "create-test-case-for-export-message" description: "Automate testing for integration and data migration setups by creating detailed test cases for export messages in D365 F&SCM." tags: ["Task topic"] updated: 2026-03-20T08:17:13Z published: 2026-03-20T17:44:08Z canonical: "docs.staedean.com/create-test-case-for-export-message" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Create test case for export message You can use test cases to automate the testing of an integration or data migration setup. For each message, you can create the desired test cases. This topic explains how to create a test case for an export message; the message source document is an internal document. ### Steps 1. Click **Connectivity studio - Integration Design**. 2. On the **Message** tab, in the list, find and select the desired export message. 3. Click **Edit**. 4. On the **Action Pane**, click **Design**. 5. Click **Test** **case**. 6. Click **New**. 7. In the **Name** field, type a value. 8. If you have defined file actions for your target connector, you can skip the file actions. As a result, the created file stays in the Working folder. Select **Yes** in the **Skip file action** field. 9. You can enter a description for the test case. For example, describe its purpose. In the **Note** field, type a value. 10. Sub-task: Define test data range. 1. Define which data in the D365 F&SCM environment is used in the test case. Expand the **Range** section. 2. Click **New**. 3. Select the record of the source document that is used to define the test data range. In the **Document** field, enter or select a value. 4. Select the field of the selected source document record that is used to define the test data range. In the **Record** **field** field, enter or select a value. 5. Define the range type that applies to the **Range** field. You can apply ranges of these types: In the **Range type** field, select an option. > [!NOTE] > **Note** > > The **Parameter type** is not applicable here. - **Value**: Enter a fixed value or a range of values using the advanced query syntax. - **Custom**: Enter a static method that defines the range. For example, you can use the SysQueryRangeUtil class to apply advanced date queries. Other examples are: 'curExt()' (gets the current company), 'strFmt("%1..%2", prevMth(today()), today())' (gets the orders from the last month), and 'DateTimeUtil::utcNow()' (filters on the current date/time). 6. Enter the range in line with the selected range type. In the **Range** field, enter or select a value. 11. Sub-task: Set up test steps with the expected results. 1. Expand the **Test steps** section. 2. Click **New**. > [!NOTE] > **Note** > > You can also use the **Create expected result** function. The test steps are automatically added based on the message field mapping. The expected results are filled in, based on the defined data range. For each record in the range, a separate set of test steps is added with the related expected results. These sets of test steps are distinguished by the target record number; each set gets its own number. If added, you can manually change the test steps as desired. 3. For informational purposes, enter a name or short description of the test step. In the **Test name** field, type a value. 4. From the message mapping, select the target record for which you want to test a field. In the **Message mapping** field, enter or select a value. 5. Select the desired mapped field of the selected target record. In the **Target** **field** field, enter or select a value. 6. If you want to test several records, use this field to distinguish the record data sets. In the **Target record number** field, enter a number. 7. Define the range type that applies to the **Expected result** field. You can apply ranges of these types: In the **Expected result type** field, select an option. > [!NOTE] > **Note** The **Parameter type** is not applicable here. - **Value**: Enter a fixed value or a range of values using the advanced query syntax. - **Custom**: Enter a static method that defines the range. For example, you can use the SysQueryRangeUtil class to apply advanced date queries. Other examples are: 'curExt()' (gets the current company), 'strFmt("%1..%2", prevMth(today()), today())' (gets the orders from the last month), and 'DateTimeUtil::utcNow()' (filters on the current date/time). 8. Enter the expected result for the selected mapped field in line with the selected expected result type. In the **Expected result** field, type a value. 9. Indicate if the test step must be done automatically or manually. If set to **Manual**, when the test is finished, a warning is shown in the test case run. You can do the test manually and change the test status accordingly on the test case run. In the **Execution** field, select an option. 10. Select the expected status for the test step. Only use the statuses **Failed** or **Passed**. If the test result matches with the expected status, in the test case run, the test step status is set to **Passed**. In the **Expected status** field, select an option. 12. Close the page. 13. Close the page.