--- title: "Create test case for import message" slug: "create-test-case-for-import-message" tags: ["Task topic"] updated: 2026-03-20T08:17:18Z published: 2026-03-20T17:44:08Z canonical: "docs.staedean.com/create-test-case-for-import-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 import 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 import message; the message target 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 import 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. For an import message, you can run a test case without actually processing the data. Select **Yes** in the **Commit data** field. > [!NOTE] > **Note** For more complex messages, to prevent errors, you are advised to commit the data. 9. If you have defined file actions for your source connector, you can skip the file actions. As a result, the file stays in the Working folder. So, you can repeat the test with the same file. Select **Yes** in the **Skip file action** field. 10. You can enter a description for the test case. For example, describe its purpose. In the **Note** field, type a value. 11. Sub-task: Define the test data source. 1. Define the data source that is used for the test case. Select either a message history record or a file. Expand the **Source** section. > [!NOTE] > **Note** > > If the source document of the message is an: > > - External filed-based document, you can use a history record or a file as data source for the test case. > - External **ODBC** document, you can only use a history record as data source for the test case. 2. In the **History** field, enter or select a value. > [!NOTE] > **Note** > > If you select a history record, the File name field is cleared. 3. If you select a file, the **History** field is cleared. In the **File name** field, enter or select a value. 12. Sub-task: Set up test step with the expected results. 1. 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 source. For each record in the data source, 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. 2. For informational purposes, enter a name or short description of the test step. In the **Test name** field, type a value. 3. 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. 4. Select the desired mapped field of the selected target record. In the **Target** **field** field, enter or select a value. 5. 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. 6. 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). 7. 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. 8. 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. 9. 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. 13. Close the page. 14. Close the page.