massimo
9 years agoOccasional Contributor
Executing external program with groovy
In a groovy teststep I add the execution of a teraterm macro to connect on remote host:
def teraterm_path = "C:\\Program Files (x86)\\teraterm"
def process = "$teraterm_path\\ttpmacro.exe SNODO-TestAut-UM-iSSW_IMCS-CP-1.TTL".execute()
process.waitFor()
def value = process.exitValue()
Inside the macro file I set the exitvalue (0=OK, 1=KO).
All works fine, but I have the following problem: if the macro file is not present the exitValue is still 0; there is a way to identify that the external program was not executed ?