AUTO IT EXE to be executed through Jenkins CI Tool

半世苍凉 提交于 2019-12-10 22:56:44

问题


I am using CI Jenkins Tool and trying to execute an AUTO IT Exe file.

I tried through Jenkins, with the following options, but nothing is working out.

  1. Execute command line arguments

  2. batch file

  3. ant file

  4. Windows runner plugin


回答1:


Running AutoIt via Jenkins on a slave will depend on how the slave is launched. Since you're using AutoIt, you're using Windows. The Windows slave can NOT be started via SSH or via Windows Service. You MUST use JNLP Web State and you MUST start it in a particular way for AutoIt to work properly.

To get AutoIt to work, the slave must first has a user logged in and at a desktop. You can do this manually, or set Windows to auto-login on startup.

Once at the desktop, the JNLP web start method must be used. This usually means downloading the slave.jar from the Jenkins server via curl, then launching java with the slave and pointing to the jnlp file on the Jenkins side. Preferably, you'll want to automate this via the Scheduler, but you can do it manually too. See here for an example: https://wiki.jenkins-ci.org/display/JENKINS/Launch+Java+Web+Start+slave+agent+via+Windows+Scheduler

Once you get the slave connected in this fashion, a job targeted at this slave that runs AutoIt should work.

NOTE: Given the nature of AutoIt, you can't run it on the master node because the master node never has desktop access that AutoIt needs. You can setup a slave agent on the master node to get around the limitation.




回答2:


The only reason when You invoke you code from Jenkins, Invoked AutoIt cannot find the required window in slave/execution Jenkins machine.

Solution: Write your AutoIt script and manually invoke it execution machine, handle the window Pop.



来源:https://stackoverflow.com/questions/21399853/auto-it-exe-to-be-executed-through-jenkins-ci-tool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!