Page 1 of 1
Ahk Continuous Testing using AppVeyor
Posted: 19 Apr 2016, 17:04
by Avi
An example project to demonstrate how to use
AppVeyor and Uberi's Yunit to set up continuous testing for your project.
Using a custom test framework is possible. See
README
The project is at
https://github.com/aviaryan/Ahk-CI-Example
AppVeyor build history
https://ci.appveyor.com/project/aviarya ... le/history
Cheers
FAQ
What is AppVeyor ?
- AppVeyor is a continuous integration service for Windows meaning it allows you to build your windows-based project for every commit you push to a git/hg repository.
It also has feature to run test scripts (again totally configurable) for every commit and the same has been used in the above project. It also monitors Pull requests so every PR opened on your project will be tested with the testcases. ( eg
https://github.com/aviaryan/Ahk-CI-Example/pull/1 )
TIP - You can easily set it up to compile your AHK project with Ahk2Exe.exe automatically for every commit. See
https://www.appveyor.com/docs/packaging-artifacts
Re: Ahk Continuous Testing using AppVeyor
Posted: 19 Apr 2016, 23:40
by hoppfrosch
Great! Was to start something similar recently ....
Re: Ahk Continuous Testing using AppVeyor
Posted: 20 Apr 2016, 00:44
by Avi
Updated the project with a custom test script without using Yunit lib.
https://github.com/aviaryan/Ahk-CI-Exam ... Simple.ahk
It goes something like this
Code: Select all
/*
This file shows a custom, barebones test script made functional without using any other libs
*/
global errorcode := 0
/*
Tests
*/
assert( 4+3 == 2+5, "Simple_Addition_Check")
s := "28"
s += "42"
i := 28
i += 42
assert( s == i, "Number_In_String_Concat_Test")
assert(Instr("abcd", "b") == 2, "Instr_Check")
/*
Exit
*/
ExitApp, % errorcode
return
assert(eq, testName, msgFail=""){
if (!eq){
FileAppend, FAIL: %testName% %msgFail%`n, *
errorcode := 1
} else {
FileAppend, PASS: %testName%`n, *
}
}
Re: Ahk Continuous Testing using AppVeyor
Posted: 20 Apr 2016, 00:53
by Avi
hoppfrosch wrote: Great! Was to start something similar recently ....
I hope people find this useful.
Re: Ahk Continuous Testing using AppVeyor
Posted: 20 Apr 2016, 11:31
by SnowFlake
What is AppVeyor?
Re: Ahk Continuous Testing using AppVeyor
Posted: 20 Apr 2016, 13:40
by Avi
SnowFlake wrote:What is AppVeyor?
Check the OP. I have updated it.
Re: Ahk Continuous Testing using AppVeyor
Posted: 22 Apr 2016, 09:25
by guest3456
great
looks like AppVeyeor supports GitLab too!
Re: Ahk Continuous Testing using AppVeyor
Posted: 22 Apr 2016, 09:32
by Avi
guest3456 wrote:great
looks like AppVeyeor supports GitLab too!
Yes. It supports url for Git, Mercurial and Subversion so basically every project running a VCS.
Re: Ahk Continuous Testing using AppVeyor
Posted: 09 Nov 2016, 10:54
by evilC
Is it possible to configure this to use AHK_H instead of AHK_L ?
I take it I would need to start an AHK_H chocolatey package?
Re: Ahk Continuous Testing using AppVeyor
Posted: 09 Nov 2016, 11:55
by Avi
evilC wrote:Is it possible to configure this to use AHK_H instead of AHK_L ?
I take it I would need to start an AHK_H chocolatey package?
Maybe this will help .
https://github.com/aviaryan/Ahk-CI-Exam ... -framework
Sorry it's been a while since I have used AHK so I don't clearly remeber what AHK_H used to be?
Re: Ahk Continuous Testing using AppVeyor
Posted: 09 Nov 2016, 12:03
by evilC
AHK_H is a fork of AHK_L.
99% the same, just with a few extra goodies (eg Multi-threading, Scrollbars + Anchor-style positioning of GuiControls)
Unfortunately there is no installer for AHK_H. In general, you install AHK_L and copy the relevant EXE over your AHK_L one.
So basically, I would need to make it install AHK_L, then download the AHK_H zip and extract the AHK_H exe and DLL into the AHK install folder.
Re: Ahk Continuous Testing using AppVeyor
Posted: 11 Nov 2016, 17:24
by fathom
evilC wrote:So basically, I would need to make it install AHK_L, then download the AHK_H zip and extract the AHK_H exe and DLL into the AHK install folder.
After using Chocolatey to install Ahk_L, it would be rather easy to perform the last operations using Powershell or cmd in a before_test step.
Re: Ahk Continuous Testing using AppVeyor
Posted: 11 Nov 2016, 17:29
by Guest
Perhaps simply download it
https://www.appveyor.com/docs/how-to/download-file/ - no need to install ahk in that case?
Re: Ahk Continuous Testing using AppVeyor
Posted: 25 Dec 2016, 23:00
by Avi
Yes we can do that. That would be much simpler if you are planning to use AHK_H. Thanks for sharing.