|
From: Alias <ali...@gm...> - 2005-10-16 00:44:49
|
Hi guys, I've been setting up my project's test suites to run with FDT and MTASC, an= d it's a really nice, tightly integrated workflow. However - what I'd really like to do would be to set up the Local Output console (which I only know about because I accidentally ran ASUnit's own tests) to show my test results - this would mean I only need to have one sw= f open in Eclipse - my main swf bult from MTASC. Is it possible to get this set up so that I don't have to compile in the flash IDE to see my test results? Even better would be ASUnit/FDT integration, so that it could display the test results and allow you to jump directly to the testcase of a failed tes= t - but I guess that's a request for the FDT guys :) Anyway - to recap - I want to create a testcase class which will launch the AsUnit local output panel, or if anyone has a better way of integrating ASUnit into Eclipse/FDT I'd love to hear about it, Thanks in advance, Alias |
|
From: Alias <ali...@gm...> - 2005-10-16 01:35:09
|
Hi guys,
Answering my own question:
I managed to get it working, by taking the following steps:
/**
* @author Alias
*/
import AllTests;
import com.asunit.controls.LocalOutputPanel;
class RunTests {
public static function main() : Void {
//set up stage to view correctly in FDT swf viewer
Stage.align =3D "TL";
Stage.scaleMode =3D "noScale";
//launch local output panel
var testInstance:LocalOutputPanel =3D LocalOutputPanel.getInstance(_root, 1=
);
Sys.println("Hello MTASC!");
//run test suite
var tests:AllTests =3D new AllTests();
}
}
Setting the swf launcher up, as per the FDT demo movie for MTASC Launcher:
See here: http://fdt.powerflasher.com/flashsite/flash.htm
(click MTASC Examples > MTASC Launcher > Demo #1
MTASC only complained about a couple of things:
- It couldn't find the Sys class - I suspect there are many better ways to
solve this, but I just copied Sys.as <http://Sys.as> from my configuration
folder to the root of my project
- It threw a type errors in:
in class:
com.asunit.controls.ScrollHandle
changed line 24
from:
startDrag(this, false, 0, _parent.upArrow._y, 0, _parent.getHandleTravel())=
;
to:
startDrag(false, 0, _parent.upArrow._y, 0, _parent.getHandleTravel());
in class:
LocalOutputPanel.as
Line 117
Change from:
startDrag(this);
to:
startDrag();
Then MTASC happily compiles (although there are a few unused import
warnings, nothing fatal).
This is with the latest alpha, release candidate by the way.
Hope someone find this useful,
Alias
On 10/16/05, Alias <ali...@gm...> wrote:
>
> Hi guys,
>
> I've been setting up my project's test suites to run with FDT and MTASC,
> and it's a really nice, tightly integrated workflow.
>
> However - what I'd really like to do would be to set up the Local Output
> console (which I only know about because I accidentally ran ASUnit's own
> tests) to show my test results - this would mean I only need to have one =
swf
> open in Eclipse - my main swf bult from MTASC.
>
> Is it possible to get this set up so that I don't have to compile in the
> flash IDE to see my test results?
>
> Even better would be ASUnit/FDT integration, so that it could display the
> test results and allow you to jump directly to the testcase of a failed t=
est
> - but I guess that's a request for the FDT guys :)
>
> Anyway - to recap - I want to create a testcase class which will launch
> the AsUnit local output panel, or if anyone has a better way of integrati=
ng
> ASUnit into Eclipse/FDT I'd love to hear about it,
>
> Thanks in advance,
> Alias
>
|
|
From: Alias <ali...@gm...> - 2005-10-16 01:47:05
|
Argh -
Further investigation seems to indicate that the compile errors are actuall=
y
due to some incorrect parameter specification in the intrinsics, and with
the modification I've made, the project now stops working in the Flash 8
compiler:
According to the flash 8 complier:
ScrollHandle.as: Line 24: startDrag requires 1 (target), 2 (target+lock) or
6 (target+lock+constraint) parameters.
This would suggest that the AsUnit code is actually correct, and the MTASC
compiler is wrong. I'll post this to the MTASC list and see if anyone has
any suggestions.
Cheers,
Alias
On 10/16/05, Alias <ali...@gm...> wrote:
>
> Hi guys,
>
> Answering my own question:
>
> I managed to get it working, by taking the following steps:
> /**
> * @author Alias
> */
> import AllTests;
> import com.asunit.controls.LocalOutputPanel;
> class RunTests {
> public static function main() : Void {
>
> //set up stage to view correctly in FDT swf viewer
> Stage.align =3D "TL";
> Stage.scaleMode =3D "noScale";
>
> //launch local output panel
> var testInstance:LocalOutputPanel =3D LocalOutputPanel.getInstance(_root,
> 1);
> Sys.println("Hello MTASC!");
>
> //run test suite
> var tests:AllTests =3D new AllTests();
> }
> }
>
>
> Setting the swf launcher up, as per the FDT demo movie for MTASC Launcher=
:
> See here: http://fdt.powerflasher.com/flashsite/flash.htm
> (click MTASC Examples > MTASC Launcher > Demo #1
>
> MTASC only complained about a couple of things:
>
> - It couldn't find the Sys class - I suspect there are many better ways t=
o
> solve this, but I just copied Sys.as <http://Sys.as> from my configuratio=
n
> folder to the root of my project
> - It threw a type errors in:
>
> in class:
> com.asunit.controls.ScrollHandle
> changed line 24
> from:
> startDrag(this, false, 0, _parent.upArrow._y, 0,
> _parent.getHandleTravel());
> to:
> startDrag(false, 0, _parent.upArrow._y, 0, _parent.getHandleTravel());
>
> in class:
> LocalOutputPanel.as
> Line 117
> Change from:
> startDrag(this);
> to:
> startDrag();
>
> Then MTASC happily compiles (although there are a few unused import
> warnings, nothing fatal).
>
> This is with the latest alpha, release candidate by the way.
>
> Hope someone find this useful,
> Alias
>
>
>
> On 10/16/05, Alias <ali...@gm...> wrote:
> >
> > Hi guys,
> >
> > I've been setting up my project's test suites to run with FDT and MTASC=
,
> > and it's a really nice, tightly integrated workflow.
> >
> > However - what I'd really like to do would be to set up the Local Outpu=
t
> > console (which I only know about because I accidentally ran ASUnit's ow=
n
> > tests) to show my test results - this would mean I only need to have on=
e swf
> > open in Eclipse - my main swf bult from MTASC.
> >
> > Is it possible to get this set up so that I don't have to compile in th=
e
> > flash IDE to see my test results?
> >
> > Even better would be ASUnit/FDT integration, so that it could display
> > the test results and allow you to jump directly to the testcase of a fa=
iled
> > test - but I guess that's a request for the FDT guys :)
> >
> > Anyway - to recap - I want to create a testcase class which will launch
> > the AsUnit local output panel, or if anyone has a better way of integra=
ting
> > ASUnit into Eclipse/FDT I'd love to hear about it,
> >
> > Thanks in advance,
> > Alias
> >
>
>
|
|
From: Luke B. <lb...@gm...> - 2005-10-17 17:56:55
|
Hey Alias, As it turns out, you've discovered a feature that was baked into the very first builds of AsUnit and actually hasn't gotten any attention since! I was running into a bug in the Macro compiler that prevented that LocalOutputPanel from displaying properly. Rather than chasing it down, I just stopped development on it and left it sad and neglected for all this time. Fortunately, you have resurrected it at a perfect time! We will take a look at the sources and see what we can find to make that panel work properly. It's definitely *not* a bug in MTASC. In general, MTASC is stricter than MMC and forces one to actually write clean code - which that LocalOutputPanel probably isn't... If you're interested in inserting the fix yourself, please feel free to download the latest sources into your classpath from CVS at sourceforge (http://sourceforge.net/cvs/?group_id=3D108947) and submit a patch via email. We'll integrate it into the next build which should be coming out shortly! Thanks, Luke Bayes www.asunit.com |
|
From: Alias <ali...@gm...> - 2005-10-17 22:47:57
|
Hi Luke, That's cool :) I think it's definitely the way to go, at least for me, as I've found the window swf generally a bit unreliable, and having to switch between the flash IDE & Eclipse to check if my tests have passed is a bit counterproductive. I've actually asked about it on the MTASC list - Nicholas Canasse had this to say: >If I remember correctly I think usualy you call startDrag on an mc instanc= e > >mc.startDrag(false,0,.....) > >so there is no need for "target". So the issue is more to do with the Flash 8 compiler being strict in a different, slightly strange way. The other thing I noticed was that the dra= g parameters were getting switched around. I'm going to get the source and se= e if I can get it to work properly. I deployed my first properly unit tested class today, and I was surprised how well it turned out. If I get it working, where should I email the patch to? Cheers, Alias On 10/17/05, Luke Bayes <lb...@gm...> wrote: > > Hey Alias, > > As it turns out, you've discovered a feature that was baked into the > very first builds of AsUnit and actually hasn't gotten any attention > since! > > I was running into a bug in the Macro compiler that prevented that > LocalOutputPanel from displaying properly. Rather than chasing it > down, I just stopped development on it and left it sad and neglected > for all this time. > > Fortunately, you have resurrected it at a perfect time! > > We will take a look at the sources and see what we can find to make > that panel work properly. It's definitely *not* a bug in MTASC. In > general, MTASC is stricter than MMC and forces one to actually write > clean code - which that LocalOutputPanel probably isn't... > > If you're interested in inserting the fix yourself, please feel free > to download the latest sources into your classpath from CVS at > sourceforge (http://sourceforge.net/cvs/?group_id=3D108947) and submit a > patch via email. We'll integrate it into the next build which should > be coming out shortly! > > > Thanks, > > Luke Bayes > www.asunit.com <http://www.asunit.com> > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > |