Data Files - Prevent SQL being executed unless the user decides

  • OS = Windows 7 Enterprise SP1 x64 bit.

  • Katalon Studio Version = 5.4.5

  • Katalon Studio logs = N/A

  • Environment (for Web testing) - N/A

  • Environment (for Mobile testing) - N/A
    * Appium version N/A
    * Mobile platform/version under test N/A
    * Real device or emulator/simulator N/A
    * Xcode version N/A
    * Appium Logs N/A
    * Application file - N/A

## Expected Behavior - Using Katalon Studio, I have created several “Data Files” of type “Database Data”. Some of these Data Files retrieve test data that already exists in my test database and some of these Data Files create test data by inserting data into my test database. The Data Files functionality within the GUI gives the user 2 options which are:-

Edit Query - allowing the SQL queries that obtain/create test data, to be edited.

Fetch Data - allowing the SQL queries to be executed. (I have raised a separate improvement request to rename this to “Execute Query” rather than Fetch Data).

The behavior that I observe at the moment is that whenever one of the Data Files is selected within the left hand pane of the GUI, the query is executed which is not what I would expect. For example, simply double click MyTestDataFile1 in the left hand pane and the SQL is actually executed. I don’t think this should happen and I would only expect the SQL to be executed if actively chose to press “Fetch Data”.

The end result is essentially SQL being executed against my wishes/expectations. This has an adverse effect if (1) The SQL returns a large amount of data (although admittedly you are restricting the volume of data that is displayed to 100 columns and 500 rows) or (2) The SQL is doing an INSERT. Additionally, if the user does a Ctrl F5 within Katalon Studio then this has the effect of executing ALL of the SQL statements for all of my test files. This means, that a user who is doing a Project Refresh (more often than not for GUI based reasons), ends up executing several SQL statements against their wishes which has an adverse result on the Studion application whilst it executes all of the SQL.

In summary, I don’t think the SQL statements which obtain/create test data should be called as a result of simply browsing within the GUI. I think that even if the behavior ends up staying the same, the ctrl F5 functionality should not be re-acquiring all of the test data.

Database retrieval time.jpg

Hello M2018,
i understand Data Files as defined in Katalon as something that contains data for test - user names, translations etc. So anything that is useful to fill data on forms or results to check against - anything that is known before test execution.
To test application that works with data and to have control over what and when is executed, you should take a look at following: