0

We are currently running automation on various machines. We have created a Web page which provides a Run button which is used to trigger Automation runs on the machines. The web page is hosted on a Tomcat server machine. On clicking the Run button a '.bat' file should be triggered on the Server machine which in turn will trigger a '.bat' file on the client machine and run the Automation Tests.

I have tried using Window.open('Run.Bat'); (the Run.bat file is inside the webapps folder) It is able to access the bat file but it opens it in a webpage and displays the command inside the .bat file. I want the .bat file to run on the server machine and not open in an html page

Sanat
  • 1
  • 1
  • 1
  • 3
  • To execute a batch file needs a shell enviroment. Per default, an http request does not provide such enviroment. You need server side code to "transfer" the information from http request into a shell enviroment. – Reporter Oct 24 '16 at 12:57
  • @reporter Can you show how to write the server side code. I have searched everywhere and nowhere is it properly given how to write the server side code ( or in which scripting language it should be written). If you can specify the exact code to run the bat file on the server machine it would solve my problem. Scripting languages are new to me. – Sanat Oct 25 '16 at 04:27
  • http://stackoverflow.com/questions/615948/how-do-i-run-a-batch-file-from-my-java-application – Reporter Oct 25 '16 at 09:58

0 Answers0