Katalon Record data driven run from command line

Hello,
I’m having trouble running a Katalon Recorder script from command line.
I’m using a csv file in order to insert login and password in a website. My test case, if run from the browser extension, works fine.
Problems come when I try to run it from command line. That’s what i tried:
D:\develop\automazione-saa2>kr-cli run chrome "Esportazioni Hypersic.html" --report=. --data=.

The result is:
>> [ERROR] Error message: Some data files needed by the tests with path D:\develop\automazione-saa2\Esportazioni Hypersic.html are missing. If your tests don’t use data files, don’t use parameter “data”.

  • [ERROR] Error message: The path doesn’t exists. D:\develop\automazione-saa2\D:\develop\automazione-saa2\hs.csv*

  • [ERROR] Error message: The files is not valid. Please try again!*

The path is duplicated! (hs.csv is the file I’m reading with loadVars)
Note: the documentation says to use “absolute path”, but using d:\develop\automazione-saa2 gives the same result, with the duplicated path.

If i try without the data parameter the browser starts up, but at the moment of reading the file the application terminates with an unexplained error:
[2021-07-08 09:14:05] [info] Executing: | loadVars | hs.csv | |
[2021-07-08 09:14:05] [error] {}
[2021-07-08 09:14:05] [debug] Test case failed

Is there anybody who can help me? I’m happy with Katalon Record, I would not like to switch to the full Studio.

@lventimiglia

Hi, is this the actual command you used?

D:\develop\automazione-saa2>kr-cli run chrome "Esportazioni Hypersic.html" --report=. --data=.

That doesn’t look correct to me, as the data and report params are not specified. Have you tried specified the actual absolute path to data file (and report folder) in the --data and --report parameter.

Hello ThankHo,
thank you for your answer.

The --report param works fine with “.” (current directory), but I changed it anyway to absolute path.
With --data I tried with an absolute path:
D:\temp>kr-cli run chrome "LD-test.html" --report=d:\temp --data=d:\temp
And the result is similar:
Error: ENOENT: no such file or directory, stat 'D:\temp\d:\temp'
Note: I’m seeing now that the parameter directory “d:\temp” is appended to the current directory “D:\temp” (with a capital D).

I also tried with forward slashes (unix-style):
D:\temp>kr-cli run chrome "LD-test.html" --report=d:/temp --data=d:/temp
The output is the same.

1 Like

@lventimiglia

Thank you for the info! Let me reproduce and check in with you again.

1 Like

@lventimiglia

We’ve releases a newer release of KR CLI with these issues fixed. Please try npm i katalon-recorder-cli@latest to install the latest version and try to see if it works.

Hello ThanhTo,
sorry for the late reply.

I installed the newer version, but it didn’t manage to have it working.
If I run with the path as parameter, as stated in the documentation, the result is the same:
d:\temp>kr-cli run chrome LD-test.html --data=d:\temp --report=d:\temp
>> [ERROR] Error message: Some data files needed by the tests with path d:\temp\LD-test.html are missing. If your tests don’t use data files, don’t use parameter “data”.
>> [ERROR] Error message: The path doesn’t exists. d:\temp\d:\temp\hs.csv
>> [ERROR] Error message: The files is not valid. Please try again!

To be sincere, if I run kr-cli --V I get 1.0.0, but looking in npm_modules I’m sure that the version is 1.0.9

I tried also to give to data parameter a specific file and not a directory:
d:\temp>kr-cli run chrome LD-test.html --data=d:\temp\hs.csv --report=d:\temp

The outcome is different: the browser starts up, but when the loadVars is executed, the application ends with an error without details:
[2021-07-16 10:52:56] [info] Executing: | loadVars | hs.csv | |
[2021-07-16 10:52:56] [error] {}
[2021-07-16 10:52:56] [debug] Test case failed

1 Like

@lventimiglia

Can you try again with the version 1.1.0 :grinning: Thank you for your patience!