librelist archives

« back to archive

BDD / TDD workflow. Technologies. Events / signals.

BDD / TDD workflow. Technologies. Events / signals.

From:
Joshua Mostafa
Date:
2012-01-16 @ 23:06
Hi there,

 

I've been a Flex / AS3 developer for a long time but recently did a
stint coding Rails. During that time I discovered Cucumber and RSpec.
I'm now returning to Flex coding, and I'd like to introduce a BDD / TDD
workflow into my Flex development. I was really pleased to find Melomel
as it looks like a great way to integrate Cucumber and Flex.

 

What I'm wondering about is this. I can see how to write Cucumber
features, which is great for the 'outer' (BDD) cycle. But what about the
inner (TDD) cycle? Is it best to use RSpec for this? In the Ruby world,
I much prefer RSpec over Test::Unit. And I'd prefer to be able to run
all my tests using the same methodology, rather than a mixture of
Melomel and say FlexUnit. But are there some things that aren't
coverable by Melomel and RSpec? 

 

In particular I'm wondering whether there's any mechanism for Melomel to
listen to events and/or signals? Seems like, if that's missing, that'd
be the main reason I'd need to mix Melomel with a native testing
solution such as FlexUnit for lower-level testing.

 

Thanks

Josh

Re: [melomel] BDD / TDD workflow. Technologies. Events / signals.

From:
Ben Johnson
Date:
2012-01-16 @ 23:58
Unfortunately, there's no way to listen for events with Melomel. Another 
problem is that communication happens over sockets with Melomel so your 
tests will run slower.

For unit testing, I would recommend using FlexUnit or ASUnit.


Ben


On Jan 16, 2012, at 4:06 PM, "Joshua Mostafa" <Joshua@whitech.com.au> wrote:

> Hi there,
>  
> I’ve been a Flex / AS3 developer for a long time but recently did a 
stint coding Rails. During that time I discovered Cucumber and RSpec. I’m 
now returning to Flex coding, and I’d like to introduce a BDD / TDD 
workflow into my Flex development. I was really pleased to find Melomel as
it looks like a great way to integrate Cucumber and Flex.
>  
> What I’m wondering about is this. I can see how to write Cucumber 
features, which is great for the ‘outer’ (BDD) cycle. But what about the 
inner (TDD) cycle? Is it best to use RSpec for this? In the Ruby world, I 
much prefer RSpec over Test::Unit. And I’d prefer to be able to run all my
tests using the same methodology, rather than a mixture of Melomel and say
FlexUnit. But are there some things that aren’t coverable by Melomel and 
RSpec?
>  
> In particular I’m wondering whether there’s any mechanism for Melomel to
listen to events and/or signals? Seems like, if that’s missing, that’d be 
the main reason I’d need to mix Melomel with a native testing solution 
such as FlexUnit for lower-level testing.
>  
> Thanks
> Josh

Re: [melomel] BDD / TDD workflow. Technologies. Events / signals.

From:
Anthony Green
Date:
2012-01-17 @ 07:06

Joshua Mostafa wrote:
> What I’m wondering about is this. I can see how to write Cucumber
> features, which is great for the ‘outer’ (BDD) cycle. But what about the
> inner (TDD) cycle? [...] I’d prefer to be able to run all my tests using
the same methodology

You could try Cuke for AS3  a BDD Cucumber wire protocol implementation 
for Flash ActionScript with a combination of FlexUnit and Mockito-flex.

https://github.com/flashquartermaster/Cuke4AS3

-- 

Anthony Green

Re: [melomel] BDD / TDD workflow. Technologies. Events / signals.

From:
Joshua Mostafa
Date:
2012-01-17 @ 22:04
Wow - that looks *perfect* for my team. I'm equally fluent in Ruby as AS3 
but the rest of the guys don't know Ruby at all - so this looks ideal for 
us. Thanks so much for the tip!

-----Original Message-----
From: melomel@librelist.com [mailto:melomel@librelist.com] On Behalf Of 
Anthony Green
Sent: Tuesday, 17 January 2012 6:06 PM
To: melomel@librelist.com
Subject: Re: [melomel] BDD / TDD workflow. Technologies. Events / signals.

You could try Cuke for AS3  a BDD Cucumber wire protocol implementation 
for Flash ActionScript with a combination of FlexUnit and Mockito-flex.

https://github.com/flashquartermaster/Cuke4AS3

-- 

Anthony Green

Re: [melomel] BDD / TDD workflow. Technologies. Events / signals.

From:
Date:
2012-01-17 @ 11:40
Along with Mockito, give Mockolate a test drive too
(http://mockolate.org/). Its events mocking is very intuitive and easy to
pick up (IMHO).

The author is also responsible for Hamcrest-AS3 which is well worth using
for unit testing assertions if you are not doing so already.

Tom

>
>
> Joshua Mostafa wrote:
>> What I’m wondering about is this. I can see how to write Cucumber
>> features, which is great for the ‘outer’ (BDD) cycle. But what about
>> the
>> inner (TDD) cycle? [...] I’d prefer to be able to run all my tests
>> using the same methodology
>
> You could try Cuke for AS3  a BDD Cucumber wire protocol implementation
> for Flash ActionScript with a combination of FlexUnit and Mockito-flex.
>
> https://github.com/flashquartermaster/Cuke4AS3
>
> --
>
> Anthony Green
>

Re: [melomel] BDD / TDD workflow. Technologies. Events / signals.

From:
Joshua Mostafa
Date:
2012-01-17 @ 22:17
Thanks very much Tom. Looks like Mockolate and Mockito-Flex are libraries 
that are roughly equivalent in function, doing a similar job to Mocha or 
rpsec-mock (except for AS3) - right? 
Looks like there's also ASMock there too...

-----Original Message-----
From: melomel@librelist.com [mailto:melomel@librelist.com] On Behalf Of 
tom@flashquartermaster.com
Sent: Tuesday, 17 January 2012 10:41 PM
To: melomel@librelist.com
Subject: Re: [melomel] BDD / TDD workflow. Technologies. Events / signals.

Along with Mockito, give Mockolate a test drive too 
(http://mockolate.org/). Its events mocking is very intuitive and easy to 
pick up (IMHO).

The author is also responsible for Hamcrest-AS3 which is well worth using 
for unit testing assertions if you are not doing so already.

Tom

>
>
> Joshua Mostafa wrote:
>> What I’m wondering about is this. I can see how to write Cucumber 
>> features, which is great for the ‘outer’ (BDD) cycle. But what 
>> about the inner (TDD) cycle? [...] I’d prefer to be able to run all 
>> my tests using the same methodology
>
> You could try Cuke for AS3  a BDD Cucumber wire protocol 
> implementation for Flash ActionScript with a combination of FlexUnit and
Mockito-flex.
>
> https://github.com/flashquartermaster/Cuke4AS3
>
> --
>
> Anthony Green
>