Ahk Continuous Testing using AppVeyor

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Ahk Continuous Testing using AppVeyor

19 Apr 2016, 17:04

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

Image

The project is at https://github.com/aviaryan/Ahk-CI-Example

AppVeyor build history https://ci.appveyor.com/project/aviarya ... le/history

Cheers :beer: :+1:


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 )
:rainbow: 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
Last edited by Avi on 20 Apr 2016, 13:39, edited 4 times in total.
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image
User avatar
hoppfrosch
Posts: 443
Joined: 07 Oct 2013, 04:05
Location: Rhine-Maine-Area, Hesse, Germany
Contact:

Re: Ahk Continuous Testing using AppVeyor

19 Apr 2016, 23:40

:thumbup: Great! Was to start something similar recently ....
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Ahk Continuous Testing using AppVeyor

20 Apr 2016, 00:44

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, *
	}
}
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Ahk Continuous Testing using AppVeyor

20 Apr 2016, 00:53

hoppfrosch wrote::thumbup: Great! Was to start something similar recently ....
:D I hope people find this useful.
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Ahk Continuous Testing using AppVeyor

20 Apr 2016, 13:40

SnowFlake wrote:What is AppVeyor?
Check the OP. I have updated it.
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: Ahk Continuous Testing using AppVeyor

22 Apr 2016, 09:25

great

looks like AppVeyeor supports GitLab too!

User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Ahk Continuous Testing using AppVeyor

22 Apr 2016, 09:32

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. ;)
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Ahk Continuous Testing using AppVeyor

09 Nov 2016, 11:55

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?
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Ahk Continuous Testing using AppVeyor

09 Nov 2016, 12:03

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.
fathom
Posts: 2
Joined: 15 May 2014, 13:47

Re: Ahk Continuous Testing using AppVeyor

11 Nov 2016, 17:24

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.
User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Ahk Continuous Testing using AppVeyor

25 Dec 2016, 23:00

Guest wrote:Perhaps simply download it https://www.appveyor.com/docs/how-to/download-file/ - no need to install ahk in that case?
:thumbup: Yes we can do that. That would be much simpler if you are planning to use AHK_H. Thanks for sharing.
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 106 guests