Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
  1. DB Best Documentation
  2. Migration Platform
  3. Creating tests
Migration Platform
  • Overview
  • Product features
    • Release notes
    • Source and target platforms
    • Third-party applications
  • Getting started
    • Creating a new project
    • Ora2Pg installation
    • Tree view filtering
    • Compatible ODAC versions
    • Opening an existing project
    • Connecting to servers
      • Connecting to an Azure SQL Database
      • Connecting to an Oracle database
      • Connecting to a PostgreSQL database
      • Connecting to a Microsoft SQL Server database
    • Command timeout
  • Mapping
    • Object mapping
    • Error mapping rules
    • Data types mapping
  • Schema conversion
  • Schema comparison
  • Data comparison
  • Data migration
    • Migration task
      • Creating migration tasks
      • Templates
      • Migration options
      • Task actions
      • Task statuses
      • Errors or non-standard situations
    • Installing migration agent
      • Installing and uninstalling the data migration agent
      • Registering the migration agents
    • Project settings
  • Test organizer
    • Creating tests
    • Auto-generating tests
    • Groups and tests execution
    • Groups and tests states and execution statuses
    • Tests moving logic
    • Importing and exporting tests
    • Advanced comparison options
    • Creating reports
    • Error handling
  • Data store
  • Development project
  • System requirements
  • Hot keys
  • Known issues
  • Support

Creating tests

  • Share
    • Share via Facebook
    • Share via Twitter
    • Share via Linkedin

The Test organizer module allows for creating test cases for the database objects to make sure they operate in a similar way. Users can both create tests manually and also auto-generate them to automate the process.

Users can create tests for the following metadata objects:

  • Table
  • View
  • Procedure
  • Functions

Creating tests 

  1. Select an object in the Source and Target metadata tree.
  2. Click the + button or choose the Create test option in the context menu (Figure 1). The New test creation wizard opens (Figure 2).

Note: These options are disabled if users didn’t select any object in the Source and Target metadata tree, or if users selected on an object of the wrong type, that is not supported to create tests.

Creating a new test

Figure 1. New test creation

  1. In the New test tab of the  New test creation wizard (Figure 2) enter the test name and description and select a test template:
  • Empty template — suits to create tests for any supported object. The parameters and SQL script fields will not be filled automatically.
  • Call template — suits to create tests for Function and Procedure objects. The Parameter field content depends on the object type. The main SQL filed contains the calling routines script. Pre and Post scripts are empty.
  • Select template —  suits to create tests only for Table and View objects.
  • Insert/Update/Delete templates  — can be used only to create tests for the Table object.

Note: The number of available templates depends on the selected object type. For example, the Call routine template will be available for programmability objects, such as procedures or functions.

New test template

Figure 2. Template selection

  1. Press Next to continue. The Definitions tab opens.
SQL CMD context menu options

Figure 3. Definitions

  1. In the Definitions tab set the test parameters and specify the Pre Script, SQL, and Post Script.
  • The Pre-script is executed before the main SQL. If the pre-script execution fails, the main SQL and the Post Script won’t be executed and test execution will be completed with error.
  • Post Script is executed after the main SQL.
  1. Press Next to continue. The Affected data objects tab opens (Figure 4).

Note: Adding the affected data objects is an optional step required in case if some data objects changed during the test execution. The Refresh button allows the system to retrieve and resolve the affected objects automatically. You can also add the pairs of affected objects manually. However, we do not recommend that unless you are absolutely sure it is necessary. When set incorrectly at this step, the affected objects may cause errors during the test execution.

Affected objects list

Figure 4. Affected data objects

Users can compare the objects affected by the test execution using the following strategies:

  • Row count
  • Fast Comparison
  • Detailed Comparison
  1. Press Next to continue. The Setup and Teardown tab opens — this step helps users choose the backup method.

The Save pretest database state option allows for automatic creation of databases’ state and configuration that will be restored after the test is over. To do that, users need to specify the source and target backup locations.

The Restore initial dataset option acts similar to the Golden copy functionality and requires a dataset that can be created in the Data Store module. To use this option, users need to specify the source and target dataset names.

Advanced backup settings

Figure 5. Setup & Teardown

  1. Сlick the Save button for creating a new test.

After saving a new test it appears in the selected group of the Test Suite tree.

Test is displayed

Figure 6. New test added


Didn’t find the answer?

You can report problems, ask questions or share ideas for improvements on our email [email protected].

Did this page help you?

Provide Feedback
PreviousMigration settings
Next Groups and tests execution

Did this page help you? Yes

Thanks for letting us know that we did a great job.

Did this page help you? No

Thanks for letting us know that there is a problem on this page.

Send Feedback

Feel free to share your ideas or occurred issues with us. The DB Best team will be happy to make our documentation better.

Please, specify your email address so that we can reach out to you to clarify your question. Also, we will use this email address to notify you about solving the issue.

* marks the mandatory fields

Dark theme Light theme

© 2002–2021 DB Best Technologies, LLC. All rights reserved.