flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Ransom Dallas <justindal...@gmail.com>
Subject Re: FlexUnit doubt
Date Thu, 27 Aug 2015 21:31:18 GMT
Your tests can extend a base class which can contain highly reused code.
The biggest issue is going to be your async setup code,  and making sure
that subclasses of the parent test wait for the superclass.   I've got some
code that does that,  I just have to find it.

On Wednesday, August 26, 2015, Héctor A <neverbirth@gmail.com> wrote:

> I know about test suites, but it's not exactly what I'm looking for, I'm
> talking about reusing logic in several tests, also allowing them to be run
> "individually" (at least in an automatized way) at any time, think of
> setting up and connecting to a database, several tests use it, and you
> don't want to do it for all of them, but there is also a test to check that
> the logic used for connection is working properly (well, in this case it's
> more complicated than that). Would be nice to get the connection from the
> connection test and reuse it for the other tests.
>
> Maybe not running the test itself, but move part of the logic to another
> class that can be shared between multiple tests could be nice as well, I
> guess in this case we'd use a BeforeClass statement, but I'm not really
> sure as in my case it's an asynchronous operation, I'll have to check the
> documentation.
>
>
>
> On Wed, Aug 26, 2015 at 11:23 AM, Justin Mclean <justin@classsoftware.com
> <javascript:;>>
> wrote:
>
> > Hi,
> >
> > While the order of the tests are not specified within a single test
> class,
> > you can have multiple tests classes in a test suite and run those. I
> think
> > that does what you are asking. [1] It’s also possible with ant. [2] It
> may
> > be that Mocks (e.g. [3]) would also help you.
> >
> > Thanks,
> > Justin
> >
> > 1. https://cwiki.apache.org/confluence/display/FLEX/FlexUnit+TestSuite <
> > https://cwiki.apache.org/confluence/display/FLEX/FlexUnit+TestSuite>
> > 2. https://cwiki.apache.org/confluence/display/FLEX/FlexUnit+Ant+Task <
> > https://cwiki.apache.org/confluence/display/FLEX/FlexUnit+Ant+Task>
> > 3. https://github.com/drewbourne/mockolate
>


-- 
Justin Dallas
Phone:814-880-5637

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message