Contributions
Re: running exe or bat file in groovy
Found solution which is working for me, executes .bat file by opening cmd prompt Need to add script in bat file and SoapUI script - Set bat file path in bat file; this is needed while executing bat file since in SoapUI during execution it is taking path of SoupUI so file is not available in that path, add below lines in your bat file c: cd till_the_batfile_path (ex- cd C:\My_docs\) - Set again path in SoapUI script Process proc=Runtime.getRuntime().exec("cmd /c start c:\\PathOfBatFile\\test.bat"); proc.waitFor()7 years agoPlace ReadyAPI QuestionsReadyAPI Questions27KViews1like4CommentsRe: How to execute a bat file from within a groovy script Test Step
I am trying to execute .bat file from SoapUI using groovy. Scrip is executing successfully but bat file is not executed, I am using both type as below both are not working Runtime.runtime.exec("cmd /c C:\\My_docs\\Soap_UI_Report\\Data\\release_template\\extract.bat"); def proc = "cmd /c C:/My_docs/Soap_UI_Report/Data/release_template/extract.bat".execute();8.3KViews0likes0Comments