Need help with database testing

Wondering if there are any resources to create test execution scripts or framework to do the data validation from SQL Server to PostgreSQL, can be any DB to DB. I’m trying to do a POC.
Just looking for an example or an framework on how to implement the solution in Katalon.

Thanks in-advance.

KS provides nothing for SQL Databases. This forum would not be an appropriate place for you to ask this question.

If I were you, I will

  • choose one type of Database software as my favorite base; possibly MySQL for me
  • import database instances of other types (SQL Server, Postgresql, etc) into my base. I will use ready-made export/import tools. For example
    https://dev.mysql.com/blog-archive/how-to-migrate-postgresql-databases-to-mysql-using-the-mysql-workbench-migration-wizard/
  • I will write SQL statements to do any type of “test”, “compare”, “diff” etc on my base. I will run SQL in bash shell scripts, execute them in the command line. I do not need any other programming languages (such as Groovy) for Database verification. SQL is the best fitting tool for this purpose.
  • I wouldn’t attempt to compare a database of SQL Server and a database of Postgres SQL directly because it requires me to develop programs in some languages such as Java. It would be more difficult than in SQL.

Well … let us split this a bit:

  • SQL Server to PostgreSQL - both drivers are provided in katalon studio by default
  • can be any DB to DB - not sure what you are trying to say by this. If the driver it is not provided by default in katalon, you can add any other supported java driver and write your custom connector.

You will, however, need, at a certain moment, to write your custom connector (search the forum for examples) since using just data-binding to compare the data from one DB to the other DB won’t help you much.

I did such in the past when I was testing certain ETL’s.
The idea i used was:

  • connect to the source db, run a certain query (e.g SELECT COUNT * FROM whatever-table)
  • connect to the destination db and run a similar query
  • compare the results

That will give you a quick test to compare that the number of records between the tables in the DB’s subject to test are the same.

For the rest it is only a matter to run various queries against the DB’s and compare the results (export them as list, iterate one vs the other etc)
Use your imagination

Thanks for your input @bionel.
I understand the concept you are trying to convey. I am following the same method. I just wanted to know how can this be done in katalon?
I am able to connect, execute query, and fetch results from SQL and Postgres SQL in Katalon by using data files.
Where and How can I write a custom groovy code that will match the results of query?
Is there any framework for that?

There is no ‘framework’ …
To decouple your test cases from the Data Binding (which won’t help you much), first you have to make yourself familiar with Custom Keywords.
You can read about them in the doc: https://docs.katalon.com/katalon-studio/docs/introduction-to-custom-keywords.html

You can also take a look at some tutorials, e.g:

or:

There is also a plugin which seems to provide some ‘generic’ connectors as Custom Keywords for various DB types, you can give it a try (not sure how good it is but you can also take a look at the code, it is public on Github and reuse / improve it as needed):
https://store.katalon.com/product/24/DBMS-Keywords

For the rest, search the forum about topics related to data validation, DB connections using Custom Keywords etc.