Data-driven testing approach with Katalon Studio


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/tutorials/data_driven_testing.html

Hi,
We need to manage data driven url’s as well as field-inputs. As far as I understand, Katalons current abilities are limited to injecting data into fields. Or is there any way to handle URLs in the same way? i.e. we need to run exactly the same test case on different endpoints/urls.
Thanks in advance for any response.

If I am understanding correctly you can do something like this :

WebUI.openBrowser(’’)

WebUI.maximizeWindow()

WebUI.navigateToUrl(uscorrecturl)

uscorrecturl is a Variable, You can then bind you data to this variable in the Test Suite Screen and it would run the same test case on the URL’s you binded.

Thanks Manpreet!
You are right, that works. I’ve also found that we can use Profiles to store global variables, and activate a profile per line in a Test Suite Collection. This gives us the flexibility we need to vary and control our environments. Thanks again.

Thats also a possibility too. But I thought you have a scenario where you want to run same test on large number of URL’s . I once had a scenario where I wanted to run a test on large set of pdp pages and I did the same way as mentioned above.

is it posible to compare a table in a web page with an excel file using “Data-driven testing” ?

My problem is that i want to compare a table in a web page with an excel file. The table is generated after applying several filters (select multiple options from the web page and then click on see products).

And all of this process should be automatic, the code must choose the filters and display the products in a table and then compare it with an excel file to see how accurate it is.

The excel file should be compared to the third part of the picture below.

I think, the code fragment in “B. Execute using a test case” is missing:

…
Copy and paste below code:
!!! code fragment missing here !!!
In which:
…

1 Like

Where’s the “Copy and paste below code:” ?