Dynamically Update SQL generated test data files before test suite/case execution?


#1

Greetings!

I’m currently spiking Katalon Studio as a potential solution for our automated testing needs.

I created multiple sets of test data using the built in connection options for querying a database.

Is there a way to trigger a refresh of this data automagically prior to each test suite being run instead of having to go in to each test data object and click “Fetch Data”? Perhaps a Test Listener that triggers a refresh on BeforeTestSuite?


#2

David,

We have a built-in function to fetch data at runtime. Pls try following script:

DBData dbTestData = findTestData('######')
dbTestData.fetchedData = dbTestData.fetchData()

#3

Thanks! I’ll try that.


#4

Hi Trong,
Are you perhaps aware of a method to dynamically set the connection string to something like a globalvariable or change the data source data content at runtime?
I have a framework, that I am porting from UFT to katalon. In this framework, many of the test cases are generated via data mining and this happens when a test starts. Also, the connection to get the data is managed via a global variable that dynamically sets connection.
I am struggling to find a descent way to implement this other than running a loop on a recordset. Because I have AS400 as my master data DB, i also need to use a custom recordset