Using Test Data / Test Data binding for collecting outputs from Test Case Executions

Bonjour,

I have a complicated Test Case, which takes a simple input parameter, and whose result (beyond “passed/failed”) is a simple output parameter, which had to be controlled by a human operator.

Let’s call them “param_input” and “param_output”.

I can easily setup a simple internal Test Data, with just one column, like:

Let’s say I have, for now, 4 values.
||param_input||
|New York|
|Mumbai|
|Milano|
|Tokyo|

After doing the data binding (the doc is pretty clear, Manage data binding | Katalon Docs), I can easily run a Test Suite which runs the Test Case 4 times, with each “param_input” from my Test Data. This is great.

The “param_output” gets printed in the Test Report, embedded among many other data. It works, but it’s pretty inconvenient.

Hence, my dream feature would be:

a) I would add a second column to my Test Data, named “param_output”.

b) I would leave its values empty initially.
||param_input||param_output||
|New York| |
|Mumbai| |
|Milano| |
|Tokyo| |

c) I would do some binding to a variable inside my Test Case.

d) Then, for each run of the Test Case, Katalon would write in the Test Data the value of “param_output” at the end of the execution.

d1) So that after each run of the Test Suite, I would get a fresh set of data:
||param_input||param_output||
|New York|Cloudy day|
|Mumbai|Sunny day|
|Milano|Very sunny day|
|Tokyo|Rainy day|

d2) Next day:
||param_input||param_output||
|New York|Rainy|
|Mumbai|Sunny|
|Milano|Sunny|
|Tokyo|Average|

Etc.

Is it feasible?

Thanks in advance,
– Michel

1 Like

Would writing to an Excel spreadsheet work? Assuming you need a permanent record, there are many forum posts you can search to regarding Excel keywords. Here’s a good start:

2 Likes

Yes, this would probably address the need. Thanks a lot for the link and suggestion.

Yet I was wondering if there was a “standard” way to use “Test Data Binding” both ways.
– Top-Down: The parameter values found in the Test Data table drive the execution of instances of Test Cases.
– Down-Top: A value calculated by an instance is copied up into the Test Data table.

It seems not. It may be more complicated than valuable indeed.

1 Like

Katalon’s “Data-driven testing” feature is designed with an implicit assumption that any input file is read-only during a test run.

Katalon performs data binding (read a file and transfer values to variables) only once when a test is launched; Katalon never reloads the file during a test run.

If you want to read+write+read an external file during a test run, then you need to re-invent a wheel for yourself.