We are going to use Jenkins for continuous delivery of AutoIt scripts in the form of EXE, which is nothing but the automated scripts for end user actions in the Windows OS. Windows GUI / Desktop application can be automated using the AutoIt freeware tool and the same test scripts can be converted into EXE(x86 or x64) using the AutoIt compiler.
AutoIt script EXE can be executed using the Windows EXE runner plug-in integrated with Jenkins.
Please download the AutoIt freeware tool using the below link;
https://www.autoitscript.com/site/autoit-script-editor/downloads/
Please download the Jenkins WAR file using the below link;
https://jenkins.io/download/
Please download the windows EXE runner plug-in using the below link;
https://wiki.jenkins.io/display/JENKINS/Windows+Exe+Runner+Plugin
Steps to follow to install the plugin in Jenkins;
1. Download the “windows-exe-runner.hpi” file using the above mentioned link
2. Go to Jenkins admin dashboard and select the “Manage plugins” under “Manage Jenkins”
3. Select “Advanced Tab”
4. Go to “Upload Plugin” section
5. Select the file “windows-exe-runner.hpi” available in your local drive
6. Click “Upload” button and ensure the success message is getting displayed once installed
7. Ensure plug-in is showing in the “Installed” tab as mentioned below
Please refer the below screenshot;
Steps to follow to configure the plugin in Jenkins;
1. Go to “Configure System” under the “Manage Jenkins”
2. Go to “Windows Exe” section
3. Click “Add Windows Exe” button
4. Enter the name of the AutoIt script EXE Example: testAdobewithReport.exe
5. Enter the path to that exe Example: C:\Users\gkannan\Test\AutoIT\testAdobewithReport.exe
6. Enter the default parameters as “/ignoregeneratecode”
7. Click “Save” button
Please refer the below screenshot;
8. Select a “New Item” in the Jenkins dashboard
9. Enter the name of the item in the “Item name” text box
10. Select the freestyle project radio button and Click “OK” button
11. Go to “Build” section
12. Click “Add build step button”
13. Select the “Windows Exe” option
14. Select the EXE name as you given in the Step-4 in the drop down list
15. Enable the checkbox of “Fail build on test failure”
16. Click “Save” button
Please refer the below screenshot;
17. Click “Build Now” option(left pane) in the newly created item dashboard as mentioned in the step-9
That’s it. You could see the AutoIt automated test execution running in your machine using Jenkins!!!
How to convert the AutoIt testAdobewithReport.au3 script to EXE?
1. Select the testAdobewithReport.au3 script in the local drive – Automated script
2. Right click the mouse
3. Click “Compile Script (x86)” option
4. testAdobewithReport.exe will be automatically generated in the same script location
We can see the HTML report publisher in the next post.