how to run autoIT through Jenkins - batch-file

I am trying to run my protractor scripts through Jenkins, I have a script where autoIT need to execute, to upload a file.
When i run protractor command through "Execute Windows batch command" i get the following error:
" 'protractor' is not recognized as an internal or external command,
operable program or batch file. "
I have set the Jenkins slave path. Could any one please help to solve this.
When i run through SSH command, protractor was able to run but could not start execution of "autoIT".

Related

Execute .bat file automatically via command line getting https error

Here is my .bat file script.
cmd /k "https://exampleserver.com/server/php/ping.php"
When i run .the file via command line it says
'https:' is not recognized as an internal or external command,
operable program or batch file.
How can i run this without any error from command line ? Any help would be greatly appreciated

MSBuild execution fails through jenkins whereas same command runs properly through command prompt

I tried to execute the below command from Jenkins, and I got below error. I tried to print the command and executed the same command through cmd.exe and it runs successfully. I checked the folder permission and it is having the write permission. I ran jenkins using war file and saw it is executing under the same user as cmd.exe is running
Command that is executed on both jenkins and cmd.exe is,
"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" "d:\jenkins\workspace\NewTestItem\App\abc.sln" /t:rebuild /p:PackageLocation=d:\jenkins\workspace\NewTestItem\iisPackageDeploymentDir\26\ /p:DeployOnBuild=True /p:Configuration=Release /m /v:d /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
Error which I am getting in jenkins
Microsoft.Common.CurrentVersion.targets(3821,5): error MSB3021: Unable to copy file "d:\jenkins\workspace\NewTestItem\App\mgmt\UserGuide\US\help.pdf" to "bin\mgmt\UserGuide\US\help.pdf". Access to the path 'bin\mgmt\UserGuide\US\help.pdf' is denied.
Note : Solution contains multiple project

Executing FART.exe (find and replace text) commands on remote server through SSH

I'm executing a batch file on a remote server from our build server (Jenkins) through SSH. The batch file uses fart.exe commands to find and replace text. I have placed the fart.exe in C:\Windows\System32 and I'm invoking it as C:\windows\system32\fart.exe in the batch file.
The command works perfectly fine oin the remote server, but when invoking through SSH I get an error in the Jenkins log as:
'"C:\windows\system32\fart.exe"' is not recognized as internal or external command.
This is the only error I'm getting and the other commands successfully execute in the batch script. Both of the servers are Windows Server 2012 R2.
I tried adding the path to system variable but it didn't work.
This is how the Fart.exe is used in the batch script.
for /R "%BACKUP_SOURCE%" %%G in (%ConfigFile%) do (
"C:\windows\system32\fart.exe" "%%G" %PlaceHolder% %AppPath%
)
Invoking From Jenkins
I don't think the way i invoke the batch script do matter, because it is done trough the Jenkins SSH plugin. The batch script get invoked successfully. The error i get is from when executing the Fart.exe
I tried invoking a different command of an exe located in the same path, and that is successfully invoked. so i guess the issue is isolated to FART.EXE.

Jenkins Batch contains .exe command inside

I have a Jenkins job that runs an "Execute Windows batch command", inside that batch I have a.exe, Jenkins job fails with this message:
"a.exe is not recognized as an internal or external command"
but when I run manually batch that have inside a.exe is working.
Did you try Windows Exe Runner Plugin, I have been using it for a while and it let me run .exe from jenkins.

.bat file not executing in jenkins

i have made a main() class,which is calling testng.xml.In the testNG.xml,i have coded for all the testNG classes(test cases ,done by selenium).Now I have created a JAR of the main() class.Then I have created a .bat file to execute the JAR.
Problem:
I am trying to integrate my code with JENKINS,but each build is getting failed due to org.testng.TestNG Exception and NoclassFoundException
But whenever I am executing the JAR through .bat file(not in JENKINS) created.Its executing fine.
Step1
Add "Execute Windows batch command" from the job config.
Step2
cd your_bat_script_directory
foo.bat

Resources