Continuous Integration with AsUnit?
We received another excellent question today on the asunit-users list. This one came from Ian Tyrell.
I believe he wanted to know if AsUnit could be coerced to play nicely with other mainstream continuous integration tools. Specifically, he asked, "...what would be needed to take things a step further and automatically run/evaluate the tests. What’s stopped me in the past is the use of LocalConnection between tests and TestUI"...
Well Ian, we haven't really brought AsUnit 2.x to that point yet, but AsUnit 3.x is pretty much ready to go. Fortunately, there is still hope for ActionScript 2.0 developers!
Many thanks to some genius at Macromedia, there is a little-known feature of the Flash Debug Player that allows it to output errors and trace statements to a text file - anywhere on your system.
Following are some articles that extoll the virtues of this feature in depth:
Greg Wygonik
actionscript.org
livedocs.macromedia.com
Once this has been properly configured, you can then write or implement whatever scripts you want to watch changes made to that file, and when some knucklehead (like me) checks in broken code, an email can be sent to the entire team with the failure log and even a list of the most recent version control checkins.
I haven't actually set up a system like this yet, because so far, Ali and I have been able to work pretty much by ourselves over the past couple of years, and if someone checks in broken code - it's usually pretty easy to guess who it was, and - I'm not too hard to find!
As it stands, it should be pretty easy to dig into the sources associated with AsUnit 2.x and make it "trace" the output rather than (or in addition to) sending it to the TextField that it currently sends to.
Ultimately, if you can get the AsUnit UI to send the contents of the TextField to a trace statement instead of the TextField, you should be able to pretty easily set up some service to watch that .log file and provide whatever embarrasing notification you deem necessary...
Please let me know if you get this working, as I would love to update the sources with your changes so that others can also benefit.
Good Luck,
Luke Bayes
www.asunit.org
2 Comments:
Hey Luke,
We just ran into a small issue doing continuous integration with ASUnit on Mac with AS2/3. We are using Ant instead of Rake for now and it seems that the stand alone player on Mac does not let the Ant script block for completion. So, Ant fires up the player with the unit tests and once it is openedthe Ant script just moves on. We have Ant reading the flash log and can see errors but the timing of it doesnt work on Mac. On Windows the Ant script waits around appropriately for the player to complete.
I know this isnt really an ASUnit question but thought that you might have some insights.
Thanks.
Hi Luke,
I know this post is a bit old, but I've done and I'm still doing some experiments integrating AsUnit with TeamCity to setup our continuos integration system.
Here is the first step
Continuous Integration with AsUnit
hope this helps
and also could you tell me if there is a way to know when a TestRunner has finished executing?
cheers
Simone
Post a Comment
<< Home