How can we write to Internal Data File in Katalon

Hello Team,

I have some test cases where I need to create some test accounts and then save the Username / Passwords.

The way I want to handle this situation is to Create accounts and then Save the Username / Passwords to the Internal data File and then use the same Username / Passwords for the Login Test Cases.

Currently, I am manually adding the created Username / Passwords to the File and then Use a copy of the same file to randomly select Username / Password to login.

So i sort of understand what you want to do but not 100%,either way ill just add some helpfull links which i feel are proably going to come in useful. If they dont please could you explain it better.

I think global variables is most likely - save the user name and password created then call it again when you go to login.

Another way would be using test data so i have added that to the links.

Hello Harry,

Thanks for sharing the information.

Here is the requirement I have :

1.1 Create some test accounts on our website ( Already Done )
1.2 I want to automatically save the Username and Password used in creating the test accounts in Step 1.1 to the Internal Data File ( Not Done)
1.3 Utilize the Test Accounts saved in 1.2 Internal Data File in some other scenarios across the Project.

Basically, I want to maintain a database of the Username and Passwords for accounts I created so that they can be utilized in other test cases.

1 Like

Hey there, I would also like to write data from my test cases to a Katalon Internal Data File instead of writing it to an excel file. Would love to find out how to Identify the location of the data files in Katalon Studio to programmatically insert data into them. I haven’t figured out the way to write data in Katalon Internal Files programatically but I was able to do it using database. There is an easy way to connect to a database and write / read from database. Spinning up a database on AWS would be a great choice here because if you are using database installed on your local machine you will encounter issues when you will run your test cases on CI / CD server.

Hi guys, I thought I would create a gist that could be used to replace a value in a specified internal data file and replace a value at a specified row and column.

This requires the XMLBeam Data Projector (at this time I’m using 1.4.16).

  1. Download and place the XMLBeam Data Projector library into the Drivers folder
  2. Create a Keyword using the gist
  3. Use the Custom Keyword in the test case

I am sure this can get extended to insert and delete rows and columns at runtime since it just uses XML to manipulate the structure and the internal data file is very predictable.

The only issue I can see is that it will not be possible to create a new internal data file at runtime since a dataFileGUID is generated and I am not sure where this hooks to (yet).

1 Like