Data binding - Image files -REST API testing

Hi KS Team,

how to configure jpg, .wsq, .jp2 format image data files at test suite level?
currently am using at test case level
String path = RunConfiguration.getProjectDir() + “\Data Files\Biometric Data”
please give suggestions

Thanks

Hi,

Let me try to investigate more if possible to help

To configure image data files at the test suite level in Katalon Studio, you can follow these steps:

  1. Create a folder in your project directory to store the image data files. For example, you can create a folder named “Biometric Data” in the “Data Files” folder in your project directory.
  2. Place the image data files that you want to use in the test suite in the “Biometric Data” folder.
  3. In your test suite, you can use the RunConfiguration.getProjectDir() method to get the path to the project directory, and then concatenate the path to the “Biometric Data” folder to get the path to the folder where the image data files are stored.

For example
String path = RunConfiguration.getProjectDir() + “\Data Files\Biometric Data”

This will give you the path to the “Biometric Data” folder in your project directory, which you can use to access the image data files stored in that folder.

I hope this helps. Let me know if you have any further questions or need more assistance.

What do you mean by saying “configure” here?

What do you mean by saying “at test suite level” here?

I have no idea what you want to achieve.

Thanks for the response.

i have logic to get the image data from local folder and convert to Base64 then submit API request.
The same logic used for various scenarios with different type of modalities.

So instead of repeating the test case, i thought of using data binding feature at Test Suite.

@indumathi_balas

You can rename your Biometric Data file to Biometric Data.csv.

I mean, you regard the file as a CSV file which contains only 1 line, 1 column. The only 1 item will contain the base64-encoded data.

Then you would setup “Data-driven testing in Katalon Studio” to consume that CSV file. You are already familiar with it, aren’t you?

Sure. i will check how it works.

it seems if i change another person biometric data, then should i convert manually and place it in the .csv file?
am trying to minimize the manual work.

am learning from Katalon community. This is my first REST API project using Katalon.

I do not see your difficulties without code.

Please try writing some code.

If you got error, then show the code and error to us. We, guys in this forum, may be able to advice about the code,

image

can you share how to use the test data?

No, I am unable. Information you provided is not enough.

The above payload used for base64 submissions.
earlier i have stored the base64 string into global variable
the value gets through local variable to submit payload

let me know what the other information required

I can not reproduce your case on my PC. So I would quit.

Thanks.

please share if you get another solution