|
From: Darren C. <da...@dc...> - 2006-03-29 08:53:07
|
Hi, I've implemented the below proposal. See the attached zip file [I just discovered I cannot post zip files - if you want me to send it to you directly let me know]. Put those 4 files in your as2/com/asunit/framework directory (2 files get replaced, 2 new files). (My changes tested with latest SVN, but I believe the last release is currently identical.) The defaults use LocalConnection so should work just as before. To use the XMLServer, you need to do two things: 1. Add these two lines to your main(): Assert.TestRunnerType="XMLSocket"; Assert.TestRunnerParameters="127.0.0.1:9123"; 2. Make a socket server that listens on 127.0.0.1, port 9123. I've a half-finished PHP script that makes the actionscript, runs mtasc, runs the tests, listens on the socket, and reports the results. I might not have that ready until next week (feel free to push me). BTW, Assert.as in the zip file also contains the assertEquals improvements mentioned in my next email. Darren >>>The file in question is located in >>>framework/as2/com/asunit/framework/TestRunner.as >>>... >> >>For proof-of-concept I'll try just replacing that whole file. >>... >>I'm willing to work on an XML sockets version, with a PHP back-end. > > > I have a working proof-of-concept now, so unless someone is already > working on this I'll go ahead and do it properly. This will just be in > the as2 branch (I need Flash 6 support so haven't looked at as25/as3). > > My proposed changes: > > 1. Split TestRunner into TestRunner and TestRunnerLocalConnection. > (I.e. TestRunner will become an abstract base class) > > 2. Add TestRunnerXMLSocket as an alternative > > 3. In Assert.as's getTestRunner() decide what type of object to return. > > We need a way to tell Assert which TestRunner to use. > TestRunnerLocalConnection needs no parameters, but XMLSocket needs an IP > and port. By idea is to define these vars in Assert: > > public static TestRunnerType:String="LocalConnection"; > public static TestRunnerParameters:String=null; > > So by default it will work the way it does currently, and to use an > XMLSocket I'd write this code: > Assert.TestRunnerType="XMLSocket"; > Assert.TestRunnerParameters="127.0.0.1:9123"; > > Any opinions? > > Darren > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > > |