I'm building a simple email reporting system for my automated tests (in Katalon Studio).
When tests are failed, email gets sent using sendEmail.
if (GlobalVariable.testSuiteStatus=='FAILED'){
String bf = RunConfiguration.getProjectDir() + '/' + 'email.bat'
Process p = Runtime.getRuntime().exec(bf)
}
Email.bat contains:
cmd /c start cmd /k cd c:\\Program Files\\sendEmail-v156
sendEmail.exe -f sender@email.com -t receiver@email.com -s smtp.server.com:587 -xu myUsername -xp myPassword -m 'Test report text'
Each time this is run (or when I just doubleclick the bat file), only the first line gets executed.
So, how can I make this work?