You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Erik de Bruin <er...@ixsoftware.nl> on 2014/12/10 14:17:16 UTC

FlexUnit testing now built into the Flex SDK

Hi,

While working on the Promise class, I very much wanted to be able to
use FlexUnit to test the code. As I could not find SDK wide support
for FlexUnit, I went ahead and started building it.

I'm working on an article [1] that will eventually explain it all,
here is the rough guide:

1) the main build script now has a target 'test'; this target is not
part of the 'main' run and does nothing but call:
2) the frameworks build script's 'test' target, which clean the
previous test reports and calls any test targets ('xxx-test') that may
exist, which in turn call:
3) the project build script's 'test' target, that set up the project
specific properties and calls back to:
4) 'flexunit-tests.xml' in the SDK root. This file is where the magic
happens. Based on the input from the project build script, it runs any
FlexUnit tests that have been set up for that project and reports back
success or fail.

Any projects for which we want to add FlexUnit tests can easily hook
into this system by adding the tests and add a copy of the 'test'
target to their build script.

EdB

1: https://cwiki.apache.org/confluence/x/c4H_Ag



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: FlexUnit testing now built into the Flex SDK

Posted by Erik de Bruin <er...@ixsoftware.nl>.
Doh! First build the SDK, dude ;-)

All is well now, the tests run cleanly on the CI server.

EdB


On Wed, Dec 10, 2014 at 3:21 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
> And, like it's software development or something, stuff is not working
> on the CI machine. This is my ant 'stack trace':
>
> test-run:
>      [echo] Unit tests for
> 'c:\Jenkins\workspace\flex-sdk_test\frameworks\projects\apache'
>  [flexunit] Validating task attributes ...
>  [flexunit] Generating default values ...
>  [flexunit] Using default reporting dir
> [c:\Jenkins\workspace\flex-sdk_test\frameworks\projects\apache]
>  [flexunit] Using the following settings for compilation:
>  [flexunit] FLEX_HOME: [c:\Jenkins\workspace\flex-sdk_test]
>  [flexunit] player: [flash]
>  [flexunit] sourceDirectories:
> ["c:\Jenkins\workspace\flex-sdk_test\frameworks\projects\apache\src"]
>  [flexunit] testSourceDirectories:
> ["c:\Jenkins\workspace\flex-sdk_test\frameworks\projects\apache\src"]
>  [flexunit] libraries:
> ["c:\Jenkins\workspace\flex-flexunit\FlexUnit4\target\bin\flexunit-4.3.0-20140410-as3_4.12.0.swc","c:\Jenkins\workspace\flex-flexunit\FlexUnit4\target\bin\flexunit-4.3.0-20140410-flex_4.12.0.swc","c:\Jenkins\workspace\flex-flexunit\FlexUnit4\target\flexunit-4.3.0-20140410-as3_4.12.0.swc","c:\Jenkins\workspace\flex-flexunit\FlexUnit4\target\flexunit-4.3.0-20140410-flex_4.12.0.swc","c:\Jenkins\workspace\flex-flexunit\FlexUnit4CIListener\target\bin\flexunit-cilistener-4.3.0-20140410-4.12.0.swc","c:\Jenkins\workspace\flex-flexunit\FlexUnit4CIListener\target\flexunit-cilistener-4.3.0-20140410-4.12.0.swc"]
>
> BUILD FAILED
> c:\Jenkins\workspace\flex-sdk_test\build.xml:2005: The following error
> occurred while executing this line:
> c:\Jenkins\workspace\flex-sdk_test\frameworks\build.xml:141: The
> following error occurred while executing this line:
> c:\Jenkins\workspace\flex-sdk_test\frameworks\build.xml:513: The
> following error occurred while executing this line:
> c:\Jenkins\workspace\flex-sdk_test\frameworks\projects\apache\build.xml:192:
> The following error occurred while executing this line:
> c:\Jenkins\workspace\flex-sdk_test\flexunit-tests.xml:74: Could not
> create test runner from template.
>
> Any ideas?
>
> EdB
>
>
>
> On Wed, Dec 10, 2014 at 2:20 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
>> Ah, and before I forget: I have added a new job to the build VM that
>> runs all tests on every commit or once daily (like the other jobs).
>>
>> EdB
>>
>>
>>
>> On Wed, Dec 10, 2014 at 2:17 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
>>> Hi,
>>>
>>> While working on the Promise class, I very much wanted to be able to
>>> use FlexUnit to test the code. As I could not find SDK wide support
>>> for FlexUnit, I went ahead and started building it.
>>>
>>> I'm working on an article [1] that will eventually explain it all,
>>> here is the rough guide:
>>>
>>> 1) the main build script now has a target 'test'; this target is not
>>> part of the 'main' run and does nothing but call:
>>> 2) the frameworks build script's 'test' target, which clean the
>>> previous test reports and calls any test targets ('xxx-test') that may
>>> exist, which in turn call:
>>> 3) the project build script's 'test' target, that set up the project
>>> specific properties and calls back to:
>>> 4) 'flexunit-tests.xml' in the SDK root. This file is where the magic
>>> happens. Based on the input from the project build script, it runs any
>>> FlexUnit tests that have been set up for that project and reports back
>>> success or fail.
>>>
>>> Any projects for which we want to add FlexUnit tests can easily hook
>>> into this system by adding the tests and add a copy of the 'test'
>>> target to their build script.
>>>
>>> EdB
>>>
>>> 1: https://cwiki.apache.org/confluence/x/c4H_Ag
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: FlexUnit testing now built into the Flex SDK

Posted by Mihai Chira <mi...@gmail.com>.
Does anyone mind if I get the unit tests to start running as part of
the checkintests target?

On 10 December 2014 at 16:18, Tom Chiverton <tc...@extravision.com> wrote:
> On 10/12/14 14:21, Erik de Bruin wrote:
>>
>>   [flexunit] Using the following settings for compilation:
>>   [flexunit] FLEX_HOME: [c:\Jenkins\workspace\flex-sdk_test]
>>   [flexunit] player: [flash]
>
>
> Maybe that SDK hasn't been build with the new bits ?
>
> Tom

Re: FlexUnit testing now built into the Flex SDK

Posted by Tom Chiverton <tc...@extravision.com>.
On 10/12/14 14:21, Erik de Bruin wrote:
>   [flexunit] Using the following settings for compilation:
>   [flexunit] FLEX_HOME: [c:\Jenkins\workspace\flex-sdk_test]
>   [flexunit] player: [flash]

Maybe that SDK hasn't been build with the new bits ?

Tom

Re: FlexUnit testing now built into the Flex SDK

Posted by Erik de Bruin <er...@ixsoftware.nl>.
And, like it's software development or something, stuff is not working
on the CI machine. This is my ant 'stack trace':

test-run:
     [echo] Unit tests for
'c:\Jenkins\workspace\flex-sdk_test\frameworks\projects\apache'
 [flexunit] Validating task attributes ...
 [flexunit] Generating default values ...
 [flexunit] Using default reporting dir
[c:\Jenkins\workspace\flex-sdk_test\frameworks\projects\apache]
 [flexunit] Using the following settings for compilation:
 [flexunit] FLEX_HOME: [c:\Jenkins\workspace\flex-sdk_test]
 [flexunit] player: [flash]
 [flexunit] sourceDirectories:
["c:\Jenkins\workspace\flex-sdk_test\frameworks\projects\apache\src"]
 [flexunit] testSourceDirectories:
["c:\Jenkins\workspace\flex-sdk_test\frameworks\projects\apache\src"]
 [flexunit] libraries:
["c:\Jenkins\workspace\flex-flexunit\FlexUnit4\target\bin\flexunit-4.3.0-20140410-as3_4.12.0.swc","c:\Jenkins\workspace\flex-flexunit\FlexUnit4\target\bin\flexunit-4.3.0-20140410-flex_4.12.0.swc","c:\Jenkins\workspace\flex-flexunit\FlexUnit4\target\flexunit-4.3.0-20140410-as3_4.12.0.swc","c:\Jenkins\workspace\flex-flexunit\FlexUnit4\target\flexunit-4.3.0-20140410-flex_4.12.0.swc","c:\Jenkins\workspace\flex-flexunit\FlexUnit4CIListener\target\bin\flexunit-cilistener-4.3.0-20140410-4.12.0.swc","c:\Jenkins\workspace\flex-flexunit\FlexUnit4CIListener\target\flexunit-cilistener-4.3.0-20140410-4.12.0.swc"]

BUILD FAILED
c:\Jenkins\workspace\flex-sdk_test\build.xml:2005: The following error
occurred while executing this line:
c:\Jenkins\workspace\flex-sdk_test\frameworks\build.xml:141: The
following error occurred while executing this line:
c:\Jenkins\workspace\flex-sdk_test\frameworks\build.xml:513: The
following error occurred while executing this line:
c:\Jenkins\workspace\flex-sdk_test\frameworks\projects\apache\build.xml:192:
The following error occurred while executing this line:
c:\Jenkins\workspace\flex-sdk_test\flexunit-tests.xml:74: Could not
create test runner from template.

Any ideas?

EdB



On Wed, Dec 10, 2014 at 2:20 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
> Ah, and before I forget: I have added a new job to the build VM that
> runs all tests on every commit or once daily (like the other jobs).
>
> EdB
>
>
>
> On Wed, Dec 10, 2014 at 2:17 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
>> Hi,
>>
>> While working on the Promise class, I very much wanted to be able to
>> use FlexUnit to test the code. As I could not find SDK wide support
>> for FlexUnit, I went ahead and started building it.
>>
>> I'm working on an article [1] that will eventually explain it all,
>> here is the rough guide:
>>
>> 1) the main build script now has a target 'test'; this target is not
>> part of the 'main' run and does nothing but call:
>> 2) the frameworks build script's 'test' target, which clean the
>> previous test reports and calls any test targets ('xxx-test') that may
>> exist, which in turn call:
>> 3) the project build script's 'test' target, that set up the project
>> specific properties and calls back to:
>> 4) 'flexunit-tests.xml' in the SDK root. This file is where the magic
>> happens. Based on the input from the project build script, it runs any
>> FlexUnit tests that have been set up for that project and reports back
>> success or fail.
>>
>> Any projects for which we want to add FlexUnit tests can easily hook
>> into this system by adding the tests and add a copy of the 'test'
>> target to their build script.
>>
>> EdB
>>
>> 1: https://cwiki.apache.org/confluence/x/c4H_Ag
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: FlexUnit testing now built into the Flex SDK

Posted by Erik de Bruin <er...@ixsoftware.nl>.
Ah, and before I forget: I have added a new job to the build VM that
runs all tests on every commit or once daily (like the other jobs).

EdB



On Wed, Dec 10, 2014 at 2:17 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
> Hi,
>
> While working on the Promise class, I very much wanted to be able to
> use FlexUnit to test the code. As I could not find SDK wide support
> for FlexUnit, I went ahead and started building it.
>
> I'm working on an article [1] that will eventually explain it all,
> here is the rough guide:
>
> 1) the main build script now has a target 'test'; this target is not
> part of the 'main' run and does nothing but call:
> 2) the frameworks build script's 'test' target, which clean the
> previous test reports and calls any test targets ('xxx-test') that may
> exist, which in turn call:
> 3) the project build script's 'test' target, that set up the project
> specific properties and calls back to:
> 4) 'flexunit-tests.xml' in the SDK root. This file is where the magic
> happens. Based on the input from the project build script, it runs any
> FlexUnit tests that have been set up for that project and reports back
> success or fail.
>
> Any projects for which we want to add FlexUnit tests can easily hook
> into this system by adding the tests and add a copy of the 'test'
> target to their build script.
>
> EdB
>
> 1: https://cwiki.apache.org/confluence/x/c4H_Ag
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl