I would like to trigger my Katalon scripts on my test server utilizing some sort of shortcut icon. I would normally create a powershell Ps1 file and run it to trigger a test with other testing products.
PS C:> Invoke-Expression -Command "C:\Users\mark\Downloads\Katalon_Studio_Windows_64-4.4\katalon.exe -runMode=console
I have found the Katalon will start, but immediately dies, without error, the behaviour is the same with or without augments. Is there a proper way to do this. I have tried the
“Generate Command” function but the string provided only seems to execute in a CMD window and when I put it in a batch file, not at all.
I have found the solution, to run Katalon from Powershell, you need to adjust the command line from the “Command line for console mode” tool. I opened powershell ISE and did this:
&“C:\Users\Administrator\Downloads\Katalon_Studio_Windows_64-4.4\katalon.exe” -runMode=“console” -projectPath=“C:\xxxx\PreProduction\Katalon\xx_xxx_Ops\xx_xxx_Ops.prj” -reportFolder=“C:\xxxx\PreProduction\Katalon\xx_xxx_Ops\Reports” -reportFileName=“report” -sendMail="email@example.com" -testSuitePath=“Test Suites/xx_xxxx” -browserType=“Chrome”
this is wrapped so “cd \” is line 1
the rest is line 2
I know…"Why not set the path on the first line? well I would but for whatever reason it likes hard coded paths for the Katalon exe…I probably just need to fiddle with the syntax.
just save it as a ps1 files and it works fine.
Thanks for your solutions :). We suggest you using single quote for the PowerShell command instead of double quote.
&‘C:\Users\Administrator\Downloads\Katalon_Studio_Windows_64-4.4\katalon.exe’ -runMode=‘console’ -projectPath=‘C:\xxxx\PreProduction\Katalon\xx_xxx_Ops\xx_xxx_Ops.prj’ -reportFolder=‘C:\xxxx\PreProduction\Katalon\xx_xxx_Ops\Reports’ -reportFileName=‘report’ -sendMail=‘firstname.lastname@example.org’ -testSuitePath=‘Test Suites/xx_xxxx’ -browserType=‘Chrome’
Another piece to this, using the original powershell expression is to pass everything after the exe path in the -arguments parameter. Powershell’s Invoke-Command -Command parameter only takes a single command, not a command with arguments, which is why the -arguments switch is available.
I tried the below command as mentioned in the above post and it is still not working for me. Katalon will start, but immediately dies, without error.
Opened powershell ISE and tried execution of below command:
&‘C:\Katalon\Katalon_Studio_Windows_64-5.8.3\katalon.exe’ -runMode=‘console’ -projectPath=‘C:\Users\xoxox\Katalon Studio\xoxo\x0x0x.prj’ -reportFolder=‘C:\Katalon\Reports’ -reportFileName=‘report’ -sendMail=‘email@example.com’ -testSuitePath=‘C:\xoxox\xoxox\Katalon Studio\x0x0x\Test Suites’ -browserType=‘Chrome’
Kindly let me know if I am missing anything.
This works now for me too. I had the wrong test suite path.