|
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
>
|