Hi Chris,

sorry for the hassle this caused you.

It was a (stupid) bug in the sources of the first release that contained 
this feature. It's already fixed in As2ant 2.1+.

Anyone who experiences this error too, please make sure to download the 
latest version 2.2: 
http://sourceforge.net/project/showfiles.php?group_id=94206&package_id=164902


Cheers,
Simon

Chris Allen wrote:

>Okay,
>
>So I found the problem. I'm not sure if this is something new that was
>added to the library, but it's certainly wrong. Simon, you might want
>to update this.
>
>In org.as2lib.test.unit.XmlSocketResultPrinter you have:
>
>      private function printFooter(result:TestResult):Void {
>               socket.send("<finish hasErrors='" + result.wasSuccessful() +
>                               "'>Tests run: " + result.runCount() +
>                               ", Failures: " + result.failureCount() +
>                               ", Errors: " + result.errorCount() +
>                               "</finish>");
>       }
>
>Notice how result.wasSuccessful() returns a Boolean value for weather
>there were no errors. I think what you want is the exact opposite:
>socket.send("<finish hasErrors='" + !result.wasSuccessful() +
>
>Anyway, this change works for me. I hope it helps some one else too.
>
>-Chris
>
>On 3/2/07, Chris Allen <[EMAIL PROTECTED]> wrote:
>  
>
>>Hi,
>>
>>Just wondering if anyone has experienced this problem using the Ant
>>Unit tests tasks that Simon Wacker created.
>>
>>I'm trying to get this to work on Windows now, as I'm working on site
>>for a client, and well, I'm using Windows here. After much work I
>>managed to get the thing to work with a Mac a while back, but thought
>>that it would run pretty smoothly with a PC. I suppose I was wrong.
>>
>>Anyway, the symptoms are as follows. It seems that the SWF is launched
>>and the output is dumped to the console via the socket connection just
>>fine. But in the end the Build Fails due to some unspecified error in
>>the Task: BUILD FAILED
>>C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP\build.xml:68: Test(s)
>>failed.
>>        at org.as2lib.ant.UnitTest$Receiver.run(Unknown Source)
>>
>>Not sure why this is going on, but any insight would be a great help to me.
>>
>>Below is the Ant syntax that I'm using and the output from Ant using
>>the -v argument.
>>
>>Thanks in advance for any help people might be able to provide.
>>
>>-Chris
>>
>>P.S. Keith Peters, I know I shouldn't hard code my background color
>>like this. ;-)
>>---------------------------------------------
>>
>><target name="compileTests" description="builds unit tests swf"
>>depends="defaultTrace">
>>                <mtasc mtasc="${mtasc}" trace="${trace.class}" version="8"
>>                        src="${tests.dir}/com/otolabs/tdp/tests/TestRunner.as"
>>classpath="${3rdParty.dir}; ${src.dir}; ${tests.dir};
>>${macromediaClasses}"
>>                        swf="${build.dir}/UnitTests.swf" 
>> header="300:100:30:FFFFFF" main="yes" />
>>        </target>
>>
>>        <target name="runAllTests" depends="compileTests">
>>                <unittest swf="${build.dir}/UnitTests.swf" 
>> flashplayer="${flashplayer.exe}"/>
>>        </target>
>>
>>
>>Apache Ant version 1.6.5 compiled on June 2 2005
>>Buildfile: C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP\build.xml
>>parsing buildfile C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP\build.xml with URI =
>>file:///C:/Documents%20and%20Settings/contractor.A1329/workspace/OTOLabsTDP/build.xml
>>Project base dir set to: C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP
>> [property] Loading C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP\build.properties
>> [property] Loading Environment env.
>>Build sequence for target(s) `runAllTests' is [defaultTrace,
>>compileTests, runAllTests]
>>Complete build sequence is [defaultTrace, compileTests, runAllTests,
>>createDocumentation, compileApp, runAutomatedBuildUnitTests,
>>buildDefault, ]
>>defaultTrace:
>>compileTests:
>>Property ${macromediaClasses} has not been set
>>    [mtasc] Compiling 2 source files.
>>    [mtasc] "C:\Program Files\mtasc\mtasc.exe" -swf "C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP\build\UnitTests.swf"
>>-header 300:100:30:CCFFFF -trace
>>com.blitzagency.xray.util.MtascUtility.trace -version 8 -cp
>>"C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP\3rdParty" -cp
>>"C:\Documents and Settings\contractor.A1329\workspace\OTOLabsTDP\src"
>>-cp "C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP\tests" -cp
>>"C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP\${macromediaClasses}"
>>-main com\blitzagency\xray\util\MtascUtility.as
>>com\otolabs\tdp\tests\TestRunner.as
>>runAllTests:
>> [unittest] "C:\Program Files\Macromedia\Flash
>>8\Players\SAFlashPlayer.exe" "C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP\build\UnitTests.swf"
>> [unittest] -
>> [unittest] test is complete
>> [unittest] Time: 0.013 sec
>> [unittest] -
>> [unittest] Tests run: 3, Failures: 0, Errors: 0
>>
>>BUILD FAILED
>>C:\Documents and
>>Settings\contractor.A1329\workspace\OTOLabsTDP\build.xml:68: Test(s)
>>failed.
>>        at org.as2lib.ant.UnitTest$Receiver.run(Unknown Source)
>>
>>Total time: 610 milliseconds
>>
>>    
>>
>
>_______________________________________________
>osflash mailing list
>[email protected]
>http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>  
>

-- 
Simon Wacker
www.simonwacker.com
www.as2lib.org
www.flik-flak.de


_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to