You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Martin Heidegger <mh...@leichtgewicht.at> on 2012/02/09 18:33:35 UTC

[RT] Recommendation Unit-Test System?

If I wanted to start unit tests for the SDK: Which system do you recommend?

I have worked with FlexUnit 4 and used Mockito as for Mock objects. I 
have heard good things about Mockolate too.
I guess we should better all use the same tools? (easier for starters to 
get into them)

yours
Martin.

Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 10/02/2012 04:01, Jonathan Campos wrote:
> As a committer I see no reason to ignore written work - especially 
> tests. If someone goes through the effort to create the build scripts 
> and the unit tests (and provided the quality of everything) then it 
> should be allowed in. Whether it is FlexUnit or whatever. But I don't 
> think we should turn away someone's work because it isn't what the 
> majority wants. 
I don't suggest "throwing away the code at submission". You can still 
"accept it" but before putting it into the svn you transform it to, say, 
FlexUnit code instead of adding an additional build target to the 
system. And in order that the Apache Flex team is not busy to run around 
and change code or build system so they can test the code I suggest that 
you have just one tool for a task and tell the world which that is :)

yours
Martin.

RE: [RT] Recommendation Unit-Test System?

Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
>What makes it less exciting to me is that it references to hamcrest-as3.
>I am not sure how essential it is to FlexUnit but it would need to be referenced.

It can be built without referencing hamcrest. They share an interface that needs to be kept in sync in that case, but that is the only downside.

Mike

Notice: This transmission is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged or confidential. Any dissemination, distribution or copying of this transmission by anyone other than the intended recipient is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone and delete the original transmission. Thank you.

RE: [RT] Recommendation Unit-Test System?

Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
>I'd much prefer if this discussion can happen here so that others can learn how such a donation would work.
>
>However, feel free to ping me and/or other mentors directly or via the flex-private list if some parts of this discussion need to be private.

Works for me. The project is MIT license. All contributors to the project have signed a contributor license (same agreement as the Adobe Flex SDK contributors signed). We have all of those contributor agreements available digitally. The code exists today in GIT. In consists primarily of ActionScript code, with some Java for the continuous integration aspects.

FlexUnit 4.x, much like JUnit 4.x, wraps multiple runners to ensure that different types of test runners can be written. The projects includes many of its own runners, but also includes a runner for the original FlexUnit .9, which means there is a dependency on that older code at the moment and we will need to discuss that and its licensing. It also allows Fluint (an integration testing framework I also wrote, also MIT) test to be run, causing a dependency there.

Further, it can be compiled one of two ways. In one mode (ActionScript Only) other than those mentioned it has no dependencies on any code outside of the Flash Player core libraries, and perhaps a transient dependency right now on hamcrest-as3, but that can be easily resolved before committing. In the second method, it has dependencies on some Flex framework classes as well, but makes testing of Flex slightly easier. I think we will need to do a small amount of refactoring if tests were going to be included with the Flex framework directly so that we don't have a circular dependency. Happy to do that work.

So, basically, tell me what next steps you think I should take and I will do so.

Mike


Notice: This transmission is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged or confidential. Any dissemination, distribution or copying of this transmission by anyone other than the intended recipient is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone and delete the original transmission. Thank you.

Re: [RT] Recommendation Unit-Test System?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Fri, Feb 10, 2012 at 7:41 PM, Michael A. Labriola
<la...@digitalprimates.net> wrote:
>>>As it's a sizable chunk of code (I assume), note that this requires a code grant from whoever owns that code, see http://www.apache.org/licenses/software-grant.txt - nothing complicated but provenance and >>donation must be documented.
>
> Bertrand,
>
> I am the original author of most of it. Mind if I ping you off list to learn more?..

I'd much prefer if this discussion can happen here so that others can
learn how such a donation would work.

However, feel free to ping me and/or other mentors directly or via the
flex-private list if some parts of this discussion need to be private.

-Bertrand

Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 11/02/2012 03:41, Michael A. Labriola wrote:
> I am the original author of most of it. Mind if I ping you off list to learn more?
It seems like this process will be similar for other projects / 
products. I for my part wouldn't mind keeping the discussion on the list.

yours
Martin.

RE: [RT] Recommendation Unit-Test System?

Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
>>As it's a sizable chunk of code (I assume), note that this requires a code grant from whoever owns that code, see http://www.apache.org/licenses/software-grant.txt - nothing complicated but provenance and >>donation must be documented.

Bertrand,

I am the original author of most of it. Mind if I ping you off list to learn more?

Mike

Notice: This transmission is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged or confidential. Any dissemination, distribution or copying of this transmission by anyone other than the intended recipient is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone and delete the original transmission. Thank you.

Re: [RT] Recommendation Unit-Test System?

Posted by JP Bader <jp...@zavteq.com>.
Maven (and Flex Mojos)?

It can be a PITA to setup/maintain, but can run Flex unit tests in a
headless environment (i.e. no FP/AIR runtime installation needed, i
don't believe).

I've been on projects that run Maven in conjunction with CI ant
scripts (Lunt, Hudson/Jenkins, et al).

As a side note, it is very nice to discuss experiences of said
implementations with enterprise teams, especially because when they
learn that Flex can be tested repeatedly in such situations without
manual intervention, similar to Java and .Net, they get a little
happier (not much, but a little).

JP

On Fri, Feb 10, 2012 at 9:12 AM, Martin Heidegger <mh...@leichtgewicht.at> wrote:
> On 11/02/2012 00:04, David Francis Buhler wrote:
>>
>> Is there any interest in adopting a Continuous Integration environment
>> which kick off the Unit Tests, perhaps using Hudson?
>>
>> Note: I am unaware of the license restrictions for Hudson.
>
> Apache has a continuous integration server project called Continuum [1] that
> seems to be quite active.
>
> However: testing flex could be a challenge for the admins @ apache as it
> would require the AIR runtime _and_ the Flash Player to run the tests.
> (Some things can just be tested using air}
>
> Specially running on linux servers for which the adl does not exist it might
> be very tricky.
>
> yours
> Martin.
>
>
> [1] http://continuum.apache.org/



-- 
JP Bader
Principal
Zavteq, Inc.
@lordB8r | jp@zavteq.com
608.692.2468

Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 11/02/2012 00:04, David Francis Buhler wrote:
> Is there any interest in adopting a Continuous Integration environment
> which kick off the Unit Tests, perhaps using Hudson?
>
> Note: I am unaware of the license restrictions for Hudson.
Apache has a continuous integration server project called Continuum [1] 
that seems to be quite active.

However: testing flex could be a challenge for the admins @ apache as it 
would require the AIR runtime _and_ the Flash Player to run the tests.
(Some things can just be tested using air}

Specially running on linux servers for which the adl does not exist it 
might be very tricky.

yours
Martin.


[1] http://continuum.apache.org/

Re: [RT] Recommendation Unit-Test System?

Posted by David Francis Buhler <da...@gmail.com>.
Is there any interest in adopting a Continuous Integration environment
which kick off the Unit Tests, perhaps using Hudson?

Note: I am unaware of the license restrictions for Hudson.

On Fri, Feb 10, 2012 at 9:32 AM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> On Fri, Feb 10, 2012 at 3:27 PM, Martin Heidegger <mh...@leichtgewicht.at> wrote:
>> FlexUnit itself is a very generous offer which I think the PPMC should take.
>> Perhaps Michael can make a submission request?...
>
> As it's a sizable chunk of code (I assume), note that this requires a
> code grant from whoever owns that code, see
> http://www.apache.org/licenses/software-grant.txt - nothing
> complicated but provenance and donation must be documented.
>
> -Bertrand

Re: [RT] Recommendation Unit-Test System?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Fri, Feb 10, 2012 at 3:27 PM, Martin Heidegger <mh...@leichtgewicht.at> wrote:
> FlexUnit itself is a very generous offer which I think the PPMC should take.
> Perhaps Michael can make a submission request?...

As it's a sizable chunk of code (I assume), note that this requires a
code grant from whoever owns that code, see
http://www.apache.org/licenses/software-grant.txt - nothing
complicated but provenance and donation must be documented.

-Bertrand

Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
FlexUnit itself is a very generous offer which I think the PPMC should 
take. Perhaps Michael can make a submission request?

What makes it less exciting to me is that it references to hamcrest-as3. 
I am not sure how essential it is to FlexUnit but it would need to be 
referenced.

And the question for mock objects is still open.

yours
Martin.

RE: [RT] Recommendation Unit-Test System?

Posted by "Skogen, Espen" <es...@jpmorgan.com>.
Michael's generous offer sounds like a no-brainer to me. If FlexUnit merges in with Apache Flex, we have the original author on the PPMC, and it is supported in both IntelliJ and Flash Builder, I see absolutely no reason to consider supporting another unit testing framework for the Apache Flex project.

E


Espen Skogen | Vice President | IB Tech Market | Investment Bank | J.P. Morgan | 125 London Wall, EC2Y 5AJ,  London, United Kingdom | T: +442077420836 | espen.skogen@jpmorgan.com | jpmorgan.com


-----Original Message-----
From: Michael A. Labriola [mailto:labriola@digitalprimates.net] 
Sent: 09 February 2012 19:35
To: flex-dev@incubator.apache.org
Subject: RE: [RT] Recommendation Unit-Test System?

Not sure how the logistics of this would work, however, if we wanted to bring FlexUnit into the fold, I would be willing to donate all of the code to Apache directly. Right now it is MIT license.

-----Original Message-----
From: Piotr Kawiak [mailto:piotr.kawiak@gmail.com]
Sent: Thursday, February 09, 2012 11:27 AM
To: flex-dev@incubator.apache.org
Subject: Re: [RT] Recommendation Unit-Test System?

What about test reports? If there are two test frameworks used then I guess one either have to somehow merge the results or live with a set of two reports?
Notice: This transmission is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged or confidential. Any dissemination, distribution or copying of this transmission by anyone other than the intended recipient is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone and delete the original transmission. Thank you.
This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

RE: [RT] Recommendation Unit-Test System?

Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
>>I think that is an awesome suggestion. It would give a good and clear message that we are adopting an official unit testing framework for the Flex SDK and I think that would be a great first step into the right >>direction of the mentality of what we want to do with this SDK.

Further, I actually did some experimentation a while back on using ASUnit as the ActionScript portion of the FlexUnit tests (FlexUnit envelopes multiple runners and is really a framework of sorts). So, perhaps we can find a way to bring the community together on this instead of divide it. Perhaps the next version of FlexUnit can be a collaboration under the Apache banner and then used for our testing. These are just random thoughts.

So, mentor question then: What would it take to considering bringing an external project like FlexUnit into Apache? Would it truly be a separate project, a portion of this project? Any advice is appreciated.

Mike

Notice: This transmission is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged or confidential. Any dissemination, distribution or copying of this transmission by anyone other than the intended recipient is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone and delete the original transmission. Thank you.

RE: [RT] Recommendation Unit-Test System?

Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
By the way: Are any of you using other testing tools beside a unit testing suite and mock tests? VIsual testing (pixel comparsion?)
  or so? Just out of curiosity.

>>Yes, although mustella does a lot of those things too so we should figure out the borders
Notice: This transmission is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged or confidential. Any dissemination, distribution or copying of this transmission by anyone other than the intended recipient is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone and delete the original transmission. Thank you.

Re: [RT] Recommendation Unit-Test System?

Posted by JP Bader <jp...@zavteq.com>.
I have used FlexMonkey from Gorilla Logic
(http://www.gorillalogic.com/flexmonkey) for testing visual components
and workflow, and I believe it can help with creating unit tests and
test suites, but I think it is more visually oriented (which I found
very helpful when learning about creating testsuites, less so as I
progressed in development).

JP

On Thu, Feb 9, 2012 at 5:03 PM, David Francis Buhler
<da...@gmail.com> wrote:
> I worked for a company that did a large comparison effort for
> functional-testing tools. We liked SilkTest and ended up purchasing
> licenses and using it with good success.
>
> http://www.microfocus.com/products/silk/silktest/
>
> On Thu, Feb 9, 2012 at 5:36 PM, Tink <fl...@tink.ws> wrote:
>> If done a fair amount of Automation with http://www.riatest.com/ and
>> instrumentation of custom components.
>>
>> Tink
>>
>>
>>
>> On 9 Feb 2012, at 19:47, Martin Heidegger wrote:
>>
>>> Awesome! FlexUnit for Apache Flex! Sounds nice to me!
>>>
>>> By the way: Are any of you using other testing tools beside a unit testing
>>> suite and mock tests? VIsual testing (pixel comparsion?)
>>> or so? Just out of curiosity.
>>>
>>> yours
>>> Martin.
>>
>>



-- 
JP Bader
Principal
Zavteq, Inc.
@lordB8r | jp@zavteq.com
608.692.2468

Re: [RT] Recommendation Unit-Test System?

Posted by David Francis Buhler <da...@gmail.com>.
I worked for a company that did a large comparison effort for
functional-testing tools. We liked SilkTest and ended up purchasing
licenses and using it with good success.

http://www.microfocus.com/products/silk/silktest/

On Thu, Feb 9, 2012 at 5:36 PM, Tink <fl...@tink.ws> wrote:
> If done a fair amount of Automation with http://www.riatest.com/ and
> instrumentation of custom components.
>
> Tink
>
>
>
> On 9 Feb 2012, at 19:47, Martin Heidegger wrote:
>
>> Awesome! FlexUnit for Apache Flex! Sounds nice to me!
>>
>> By the way: Are any of you using other testing tools beside a unit testing
>> suite and mock tests? VIsual testing (pixel comparsion?)
>> or so? Just out of curiosity.
>>
>> yours
>> Martin.
>
>

Re: [RT] Recommendation Unit-Test System?

Posted by Tink <fl...@tink.ws>.
If done a fair amount of Automation with http://www.riatest.com/ and  
instrumentation of custom components.

Tink


On 9 Feb 2012, at 19:47, Martin Heidegger wrote:

> Awesome! FlexUnit for Apache Flex! Sounds nice to me!
>
> By the way: Are any of you using other testing tools beside a unit  
> testing suite and mock tests? VIsual testing (pixel comparsion?)
> or so? Just out of curiosity.
>
> yours
> Martin.


Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
Awesome! FlexUnit for Apache Flex! Sounds nice to me!

By the way: Are any of you using other testing tools beside a unit 
testing suite and mock tests? VIsual testing (pixel comparsion?)
  or so? Just out of curiosity.

yours
Martin.

Re: [RT] Recommendation Unit-Test System?

Posted by Omar Gonzalez <om...@gmail.com>.
On Thu, Feb 9, 2012 at 11:35 AM, Michael A. Labriola <
labriola@digitalprimates.net> wrote:

> Not sure how the logistics of this would work, however, if we wanted to
> bring FlexUnit into the fold, I would be willing to donate all of the code
> to Apache directly. Right now it is MIT license.
>
> -----Original Message-----
> From: Piotr Kawiak [mailto:piotr.kawiak@gmail.com]
> Sent: Thursday, February 09, 2012 11:27 AM
> To: flex-dev@incubator.apache.org
> Subject: Re: [RT] Recommendation Unit-Test System?
>
> What about test reports? If there are two test frameworks used then I
> guess one either have to somehow merge the results or live with a set of
> two reports?
> Notice: This transmission is intended only for the use of the individual
> or entity to which it is addressed and may contain information that is
> privileged or confidential. Any dissemination, distribution or copying of
> this transmission by anyone other than the intended recipient is strictly
> prohibited. If you have received this transmission in error, please notify
> the sender immediately by e-mail or telephone and delete the original
> transmission. Thank you.
>

I think that is an awesome suggestion. It would give a good and clear
message that we are adopting an official unit testing framework for the
Flex SDK and I think that would be a great first step into the right
direction of the mentality of what we want to do with this SDK.

-omar

RE: [RT] Recommendation Unit-Test System?

Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
Not sure how the logistics of this would work, however, if we wanted to bring FlexUnit into the fold, I would be willing to donate all of the code to Apache directly. Right now it is MIT license.

-----Original Message-----
From: Piotr Kawiak [mailto:piotr.kawiak@gmail.com]
Sent: Thursday, February 09, 2012 11:27 AM
To: flex-dev@incubator.apache.org
Subject: Re: [RT] Recommendation Unit-Test System?

What about test reports? If there are two test frameworks used then I guess one either have to somehow merge the results or live with a set of two reports?
Notice: This transmission is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged or confidential. Any dissemination, distribution or copying of this transmission by anyone other than the intended recipient is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone and delete the original transmission. Thank you.

Re: [RT] Recommendation Unit-Test System?

Posted by Piotr Kawiak <pi...@gmail.com>.
What about test reports? If there are two test frameworks used then I
guess one either have to somehow merge the results or live with a set
of two reports?

Re: [RT] Recommendation Unit-Test System?

Posted by Jonathan Campos <jo...@gmail.com>.
On Thu, Feb 9, 2012 at 12:23 PM, Martin Heidegger <mh...@leichtgewicht.at>wrote:

> That is no solution. That will most likely result in a mess. Not to choose
> because it would hurt ones feeling is irresponsible to the people who
> actually have to write the tests and run them. Sure: Flex has a lot of
> traction but there are enough non-flex AS3 open-source projects out there
> that are as of the transfer to Apache in a direct competition.


As a committer I see no reason to ignore written work - especially tests.
If someone goes through the effort to create the build scripts and the unit
tests (and provided the quality of everything) then it should be allowed
in. Whether it is FlexUnit or whatever.

If no one writes a single test in "whatever" then this isn't an issue. But
I don't think we should turn away someone's work because it isn't what the
majority wants. That is like us saying no to maven because we already have
ANT. If the maven peeps want to do the work and it is of good quality then
it should go in.

-- 
Jonathan Campos

RE: [RT] Recommendation Unit-Test System?

Posted by "Skogen, Espen" <es...@jpmorgan.com>.
I agree. This is going to affect both build config and code consistency. Our test suites should be as consistent and clean as the production code. In fact, I'd argue the unit test framework and syntax style should be part of our code standards. (e.g. standard asserts vs hamcrest etc)

E:)


Espen Skogen | Vice President | IB Tech Market | Investment Bank | J.P. Morgan | 125 London Wall, EC2Y 5AJ,  London, United Kingdom | T: +442077420836 | espen.skogen@jpmorgan.com | jpmorgan.com


-----Original Message-----
From: Martin Heidegger [mailto:mh@leichtgewicht.at] 
Sent: 09 February 2012 18:24
To: flex-dev@incubator.apache.org
Subject: Re: [RT] Recommendation Unit-Test System?

On 10/02/2012 03:09, Jonathan Campos wrote:
> While I too use FlexUnit and think that a consensus would be good on how to
> write tests, my fear is that we shouldn't say "use this one".
>
> There are other contributors to Flex, such as ASUnit, that we would be
> snubbing.
>
> Sadly I feel the best solution is just let people write the tests and
> whatever they choose to use that is up to them. If a group of individuals
> want to all write using one version that is up to them, but I don't know
> about saying that one is the supported or only choice.

That is no solution. That will most likely result in a mess. Not to 
choose because it would hurt ones feeling is irresponsible to the people 
who actually have to write the tests and run them. Sure: Flex has a lot 
of traction but there are enough non-flex AS3 open-source projects out 
there that are as of the transfer to Apache in a direct competition.

However: I am a free developer, not a commiter. As a developer I would 
wish for a clear statement and recommendation of the PPMC but I am fine 
with recommendations.

yours
Martin.
This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 10/02/2012 03:09, Jonathan Campos wrote:
> While I too use FlexUnit and think that a consensus would be good on how to
> write tests, my fear is that we shouldn't say "use this one".
>
> There are other contributors to Flex, such as ASUnit, that we would be
> snubbing.
>
> Sadly I feel the best solution is just let people write the tests and
> whatever they choose to use that is up to them. If a group of individuals
> want to all write using one version that is up to them, but I don't know
> about saying that one is the supported or only choice.

That is no solution. That will most likely result in a mess. Not to 
choose because it would hurt ones feeling is irresponsible to the people 
who actually have to write the tests and run them. Sure: Flex has a lot 
of traction but there are enough non-flex AS3 open-source projects out 
there that are as of the transfer to Apache in a direct competition.

However: I am a free developer, not a commiter. As a developer I would 
wish for a clear statement and recommendation of the PPMC but I am fine 
with recommendations.

yours
Martin.

Re: [RT] Recommendation Unit-Test System?

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Fri, Feb 10, 2012 at 6:54 AM, Martin Heidegger <mh...@leichtgewicht.at> wrote:
> ...Are the
> unit tests part of the things that Apache Flex offers as download to the
> user?...

Apache projects release source code, and unit tests are usually
released with that.

>
> ...That means that the contribution of FlexUnit to Apache (under
> the APL) would be preferable, right?...

I'm not familiar with FlexUnit, but if its owners agree to donate it
to this project, and if people are willing to maintain here, that
sounds like a good idea.

-Bertrand

Re: [RT] Recommendation Unit-Test System?

Posted by Dave Fisher <da...@comcast.net>.
On Feb 9, 2012, at 9:54 PM, Martin Heidegger wrote:

> On 10/02/2012 13:38, Dave Fisher wrote:
>> I understand your POV. But here I am speaking as a Mentor.
>> 
>> This project needs to make sure that the dependencies to the project that we require our users to download are acceptable in combination with the Apache License 2.0.
>> 
>> It would be very bad if releases and project graduation from the Apache Incubator was blocked due to an unfortunate choice of unit test technology.
> Thank you a lot for explaining that. That info is really helpful! Are the unit tests part of the things that Apache Flex offers as download to the user?
> 
> In any case: That means that the contribution of FlexUnit to Apache (under the APL) would be preferable, right?
> 
> Short overview:
>    ASUnit (MIT) uses as3reflection (No-License)
>    FlexUnit (MIT) uses hamcrest (BSD)
> 
>    Mockito-Flex (MIT) uses ASMock(BSD), hamcrest(BSD)
>    Mockolate (MIT) uses Floxy(BSD), FLemit(BSD), asx (No-License), hamcrest(BSD)
> 
>    FlexMonkey (GPL) uses as3commons (APL), hamcrest(BSD)

Good. Now what is needed is if a particular set is preferred by the Apache Flex PPMC then the packaging needs to be discussed with legal-discuss@apache.org. The links that I have provided describe questions asked and answered. Still all situations may be unique and worth asking for further clarification.

If a particular unit test framework is best, but more complex from a license perspective, it will be worth the effort to determine the best way to package it.

I'm not saying any of the above solutions are out of bounds, just that there is the license dimension to add to the evaluation of each potential solution.

Regards,
Dave

> 
> There are a few other open source testing projects online: AS3Unit from Libspark, Fluint, Funit, etc. but most of them seem abandoned or not really adopted.
> 
> yours
> Martin.
> 
> 
> 


Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 10/02/2012 13:38, Dave Fisher wrote:
> I understand your POV. But here I am speaking as a Mentor.
>
> This project needs to make sure that the dependencies to the project that we require our users to download are acceptable in combination with the Apache License 2.0.
>
> It would be very bad if releases and project graduation from the Apache Incubator was blocked due to an unfortunate choice of unit test technology.
Thank you a lot for explaining that. That info is really helpful! Are 
the unit tests part of the things that Apache Flex offers as download to 
the user?

In any case: That means that the contribution of FlexUnit to Apache 
(under the APL) would be preferable, right?

Short overview:
     ASUnit (MIT) uses as3reflection (No-License)
     FlexUnit (MIT) uses hamcrest (BSD)

     Mockito-Flex (MIT) uses ASMock(BSD), hamcrest(BSD)
     Mockolate (MIT) uses Floxy(BSD), FLemit(BSD), asx (No-License), 
hamcrest(BSD)

     FlexMonkey (GPL) uses as3commons (APL), hamcrest(BSD)

There are a few other open source testing projects online: AS3Unit from 
Libspark, Fluint, Funit, etc. but most of them seem abandoned or not 
really adopted.

yours
Martin.




Re: [RT] Recommendation Unit-Test System?

Posted by Dave Fisher <da...@comcast.net>.
I understand your POV. But here I am speaking as a Mentor.

This project needs to make sure that the dependencies to the project that we require our users to download are acceptable in combination with the Apache License 2.0.

It would be very bad if releases and project graduation from the Apache Incubator was blocked due to an unfortunate choice of unit test technology.

> 
> On 10/02/2012 10:21, Dave Fisher wrote:
>> In the case of ASUnit it is not even clear from the site what the license is.
>> 
> ASUnit is MPL https://github.com/lukebayes/asunit/blob/master/MIT-LICENSE.txt

This is called "Category B"

http://www.apache.org/legal/resolved.html#category-b

> 
> Aside from that. For me its enough if its "free for open source purposes" - GPL or whatever. Confluence (Apache Wiki) and Jira (Bugtracking) are both just free for open-source projects. http://www.atlassian.com/software/views/open-source-license-request

We need to be careful about "Category X".

http://www.apache.org/legal/resolved.html#category-x

But then Apache does use GPL in infrastructure in various ways. It's just that we need to take great care with project releases.

Regards,
Dave

> 
> On 10/02/2012 08:42, JP Bader wrote:
>> I have used FlexMonkey from Gorilla Logic (http://www.gorillalogic.com/flexmonkey)
> A GPL visual testing system - intriguing! I have never heard of it, will dig it deeper. Thanks! It might be too "visual" but it seems that you can write it also just in ActionScript, am I wrong?
> 
> On 10/02/2012 08:03, David Francis Buhler wrote:
>> I worked for a company that did a large comparison effort for functional-testing tools. We liked SilkTest ...
> 
> Interesting! However unfortunately it is not free or open-source - so: not an option.
> 
> yours
> Martin.
> 


Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 10/02/2012 10:21, Dave Fisher wrote:
> In the case of ASUnit it is not even clear from the site what the license is.
>
ASUnit is MPL 
https://github.com/lukebayes/asunit/blob/master/MIT-LICENSE.txt

Aside from that. For me its enough if its "free for open source 
purposes" - GPL or whatever. Confluence (Apache Wiki) and Jira 
(Bugtracking) are both just free for open-source projects. 
http://www.atlassian.com/software/views/open-source-license-request

On 10/02/2012 08:42, JP Bader wrote:
> I have used FlexMonkey from Gorilla Logic (http://www.gorillalogic.com/flexmonkey)
A GPL visual testing system - intriguing! I have never heard of it, will 
dig it deeper. Thanks! It might be too "visual" but it seems that you 
can write it also just in ActionScript, am I wrong?

On 10/02/2012 08:03, David Francis Buhler wrote:
> I worked for a company that did a large comparison effort for functional-testing tools. We liked SilkTest ...

Interesting! However unfortunately it is not free or open-source - so: 
not an option.

yours
Martin.


Re: [RT] Recommendation Unit-Test System?

Posted by Dave Fisher <da...@comcast.net>.
On Feb 9, 2012, at 11:15 AM, Jonathan Campos wrote:

> On Thu, Feb 9, 2012 at 1:05 PM, Omar Gonzalez <om...@gmail.com>wrote:
> 
>> At the least, we should say don't use ASUnit because of X reason, and I
>> think those reasons right now are a.) its abandoned, b.) docs suck, c.)
>> FlexUnit has built in support in both IntelliJ and Flash Builder.
>> 
> 
> I wasn't lobbying for ASUnit in particular. I just threw it out as a name.
> That is why I started switching to "whatever".

Guys, As you discuss various different unit testing environments it will be important to consider the implications of the license. We will likely want to make sure that there is no trouble from including any LGPL, GPL or other "Category X" software in any distribution.

In the case of ASUnit it is not even clear from the site what the license is.

Regards,
Dave

> 
> -- 
> Jonathan Campos


Re: [RT] Recommendation Unit-Test System?

Posted by Jonathan Campos <jo...@gmail.com>.
On Thu, Feb 9, 2012 at 1:05 PM, Omar Gonzalez <om...@gmail.com>wrote:

> At the least, we should say don't use ASUnit because of X reason, and I
> think those reasons right now are a.) its abandoned, b.) docs suck, c.)
> FlexUnit has built in support in both IntelliJ and Flash Builder.
>

I wasn't lobbying for ASUnit in particular. I just threw it out as a name.
That is why I started switching to "whatever".

-- 
Jonathan Campos

Re: [RT] Recommendation Unit-Test System?

Posted by Omar Gonzalez <om...@gmail.com>.
On Thu, Feb 9, 2012 at 10:09 AM, Jonathan Campos <jo...@gmail.com>wrote:

> Just dropping in 2 cents.
>
> While I too use FlexUnit and think that a consensus would be good on how to
> write tests, my fear is that we shouldn't say "use this one".
>
> There are other contributors to Flex, such as ASUnit, that we would be
> snubbing.
>
> Sadly I feel the best solution is just let people write the tests and
> whatever they choose to use that is up to them. If a group of individuals
> want to all write using one version that is up to them, but I don't know
> about saying that one is the supported or only choice.
>
> --
> Jonathan Campos
>

Several issues here, I think we should all stick to the same unit testing
frameworks for consistency so we can easily merge each others works.

But ASUnit in particular I think is something we should not be considering.
Take a look at their page: http://asunit.org/ Not a single resource at the
bottom that are supposed to be their resources for getting started work
anymore. And if I remember correctly, this project has been abandoned for
at least a year or two because the author is like either a JS or Ruby guy.
This is bad if we suggest people should, or could, use ASUnit.

At the least, we should say don't use ASUnit because of X reason, and I
think those reasons right now are a.) its abandoned, b.) docs suck, c.)
FlexUnit has built in support in both IntelliJ and Flash Builder.

-omar

Re: [RT] Recommendation Unit-Test System?

Posted by Roland Zwaga <ro...@stackandheap.com>.
>
> Well, yeah, but like you've already said, that can be verified by inOrder
> :)
>
> To sum up: me and other members of my team are really satisfied with
> FlexUnit / Mockito combo. I feel pretty confident that one can write
> any reasonable unit test using those frameworks. I definitely don't
> like idea of having more frameworks allowed as it results in tests
> suites which are harder to maintain and more complicated build. But
> that's of course only my two cents, I'm not even commiter so feel free
> to ignore me ;)
>

I believe Mockolate and Mockito probably both have their strength and
weaknesses,
but both of them are up to the task. I don't think its such a problem to
enforce one
library to be used for the Flex SDK tests,  I'm sure people are able to
work with
either one of them, regardless of their personal preference.
Me, I use Mockolate, but I'd be fine with using Mockito for Flex related
tests, it would
actually be a great excuse to learn another mocking library :)

my few cents :)

Roland

Re: [RT] Recommendation Unit-Test System?

Posted by Maciek Sakrejda <m....@gmail.com>.
+1 on a single official test suite. Consistency has value (e.g., when
debugging tests, I don't think anyone wants to reason about the
different behavior of different test suites and mocking libraries
depending on which test they are looking at).

Re: [RT] Recommendation Unit-Test System?

Posted by Piotr Kawiak <pi...@gmail.com>.
Well, yeah, but like you've already said, that can be verified by inOrder :)

To sum up: me and other members of my team are really satisfied with
FlexUnit / Mockito combo. I feel pretty confident that one can write
any reasonable unit test using those frameworks. I definitely don't
like idea of having more frameworks allowed as it results in tests
suites which are harder to maintain and more complicated build. But
that's of course only my two cents, I'm not even commiter so feel free
to ignore me ;)

2012/2/9 Martin Heidegger <mh...@leichtgewicht.at>:
> On 10/02/2012 03:25, Piotr Kawiak wrote:
>>
>> Magic string methods are not cool. Much better to have code completion
>> / refactoring support. Mockito works great for me. What do you mean by
>> 'checks if there was _any_ execution of this method call' ?
>>
> In mockito: if you have something like that
>
>   doSomething(mock);
>
> and internally it does something like
>
>   mock.a();
>   mock.b();
>   mock.c();
>
> and you test it with
>
>   verify().that(mock.a());
>
> then it will pass, even though b was called before that.
> I prefer to test my things for a particular call order as it is stricter.
>
> yours
> Martin.

Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 10/02/2012 03:33, Martin Heidegger wrote:
> and you test it with
>
>    verify().that(mock.a());
>
> then it will pass, even though b was called before that.
>
>
Of course this is the wrong way around:

verify().that(mock.b());

will be true even though a() was called before that.


Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 10/02/2012 03:25, Piotr Kawiak wrote:
> Magic string methods are not cool. Much better to have code completion
> / refactoring support. Mockito works great for me. What do you mean by
> 'checks if there was _any_ execution of this method call' ?
>
In mockito: if you have something like that

    doSomething(mock);

and internally it does something like

    mock.a();
    mock.b();
    mock.c();

and you test it with

    verify().that(mock.a());

then it will pass, even though b was called before that.
I prefer to test my things for a particular call order as it is stricter.

yours
Martin.

Re: [RT] Recommendation Unit-Test System?

Posted by Piotr Kawiak <pi...@gmail.com>.
I really wouldn't recommend choosing two unit test frameworks. Much
harder to maintain.

2012/2/9 Piotr Kawiak <pi...@gmail.com>:
> Magic string methods are not cool. Much better to have code completion
> / refactoring support. Mockito works great for me. What do you mean by
> 'checks if there was _any_ execution of this method call' ?
>
> 2012/2/9 Jonathan Campos <jo...@gmail.com>:
>> Just dropping in 2 cents.
>>
>> While I too use FlexUnit and think that a consensus would be good on how to
>> write tests, my fear is that we shouldn't say "use this one".
>>
>> There are other contributors to Flex, such as ASUnit, that we would be
>> snubbing.
>>
>> Sadly I feel the best solution is just let people write the tests and
>> whatever they choose to use that is up to them. If a group of individuals
>> want to all write using one version that is up to them, but I don't know
>> about saying that one is the supported or only choice.
>>
>> --
>> Jonathan Campos

Re: [RT] Recommendation Unit-Test System?

Posted by Piotr Kawiak <pi...@gmail.com>.
Magic string methods are not cool. Much better to have code completion
/ refactoring support. Mockito works great for me. What do you mean by
'checks if there was _any_ execution of this method call' ?

2012/2/9 Jonathan Campos <jo...@gmail.com>:
> Just dropping in 2 cents.
>
> While I too use FlexUnit and think that a consensus would be good on how to
> write tests, my fear is that we shouldn't say "use this one".
>
> There are other contributors to Flex, such as ASUnit, that we would be
> snubbing.
>
> Sadly I feel the best solution is just let people write the tests and
> whatever they choose to use that is up to them. If a group of individuals
> want to all write using one version that is up to them, but I don't know
> about saying that one is the supported or only choice.
>
> --
> Jonathan Campos

Re: [RT] Recommendation Unit-Test System?

Posted by Jonathan Campos <jo...@gmail.com>.
Just dropping in 2 cents.

While I too use FlexUnit and think that a consensus would be good on how to
write tests, my fear is that we shouldn't say "use this one".

There are other contributors to Flex, such as ASUnit, that we would be
snubbing.

Sadly I feel the best solution is just let people write the tests and
whatever they choose to use that is up to them. If a group of individuals
want to all write using one version that is up to them, but I don't know
about saying that one is the supported or only choice.

-- 
Jonathan Campos

Re: [RT] Recommendation Unit-Test System?

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 10/02/2012 02:45, Omar Gonzalez wrote:
> I'd definitely used FlexUnit 4. I'm not sure about Mockito though, I've
> only used Mockolate. I wonder how they compare. The biggest issue I've seen
> people have is this:
>
> stub(myObj).method("aMagicStringMethodName").returns(someOtherObj);
>
> Some people have issue w/ the magic strings, does Mockito have a different
> approach?
>
> -omar
>

The mockito approach is like

    given( myObj.aMethodCall(possibleArg) ).willReturn(someOtherObj);

I do like the approach. My problem with Mockito is that the verification:

    verify().that( myObj.aMethodCall() );

checks if there was _any_ execution of this method call. Optionally there is

    inOrder().verify().that( ... );

the way I prefer to do the unit tests.

yours
Martin.



Re: [RT] Recommendation Unit-Test System?

Posted by Omar Gonzalez <om...@gmail.com>.
On Thu, Feb 9, 2012 at 9:33 AM, Martin Heidegger <mh...@leichtgewicht.at>wrote:

> If I wanted to start unit tests for the SDK: Which system do you recommend?
>
> I have worked with FlexUnit 4 and used Mockito as for Mock objects. I have
> heard good things about Mockolate too.
> I guess we should better all use the same tools? (easier for starters to
> get into them)
>
> yours
> Martin.
>


I'd definitely used FlexUnit 4. I'm not sure about Mockito though, I've
only used Mockolate. I wonder how they compare. The biggest issue I've seen
people have is this:

stub(myObj).method("aMagicStringMethodName").returns(someOtherObj);

Some people have issue w/ the magic strings, does Mockito have a different
approach?

-omar