Console Mode Can't Find External Files Using the Relative Path

I’ve created a test suite that has test cases that access excel files directly and when i run it in the katalon UI with the relative paths everything works fine but when I try to run the test suite as a command line executable it’s no longer able to access the excel files.

Does anyone know any way to fix this?

Thanks for the help.

1 Like

I got the same issue when running the Mobile tests in Console mode because it can not find the relative app path

I posted the following discussion:

This sample project read/write Excel files stored in a directory under the project directory. This project works well in console mode as well as Katalon Studio GUI.

How I resolved the path of Excel file? See the following code:

    // The folder to store Excel files    static final Path storageDir =         Paths.get(RunConfiguration.getProjectDir()).resolve('Excel files')

You can get the absolute path of the project directory by calling RunConfiguration.getProjectDir(). This works the same both in the console mode as well as in the GUI.