I am trying to use Katalon to test an application that has a backend service that runs java. The problem I have is that I don’t want to import the java code into katalon as I would have to re-import it every time it changes. I want to bring up the server in in the test suite @SetUp code but I am unable to do this without setting the working directory for the JRE as the application can’t find any of its property files.
I am not able to update the application code directly.
The server code sits locally on my machine under c:\software\myserver and is essentially just an executable jar that can be called from a batch file (.bat)
I have tried adding the jar to katalon JRE and running
as JRE VM arguments but the hibernate code is still not able to find my hibernate properties files.
I also tried adding the jar as an External Library on the project - this also didn’t work
I have also tried running
Runtime.getRuntime().exec("cmd /c Server.bat", null, new File("c:\\software\\myserver\\"));
Server.bat just calls the jar, e.g:
java -cp "Server.jar" com.project.Server