Gishu Pillai | 1 Oct 13:10 2009
Picon

Re: RFC: How to structure xUnit test fixtures that share a chunk of setup + handle mocks that raise events

On Mon, Sep 28, 2009 at 5:32 AM, David Tchepak <tchepak <at> gmail.com> wrote:

>
> If you are using Rhino Mocks 3.5+ I recommend using the Arrange - Act -
> Assert syntax to give you a dynamic mock without worrying about the
> record/replay/verify stuff:
>

Thanks David. The specific issue I was seeing was due to the Record-Replay
model of Rhino Mocks. An event subscription in the test subject's ctor (in
Setup()) was recorded as an expectation - since ReplayAll is only called
half-way thru the test.
Moving to the new v3.5 AAA style resulted in a much more intuitive test.

I guess my bigger question was - how do we share a major chunk of setup code
between 2 test fixtures? Since the setups differ, they should ideally be
different xUnit TestFixtures. However duplicating  the same fixture member
variables and expectations seemed a bit off to me... Was evaluating if
someone had worked out a scheme based on inheritance.

I got another suggestion off the list of having private helper methods that
setup state. So each test begins with a call to one of these setup-helper
methods.

-- Gishu

[Non-text portions of this message have been removed]

------------------------------------

(Continue reading)

Gishu Pillai | 1 Oct 13:13 2009
Picon

Re: Re: RFC: How to structure xUnit test fixtures that share a chunk of setup + handle mocks that raise events

On Tue, Sep 29, 2009 at 12:01 PM, zzzuperfly <ostenpajobbet <at> hotmail.com> wrote:

>
> only one mock per test, the others should be stubs, since otherwise you are not really testing anything ;)
>
> I would suggest you read "The art of unit testing" by roy osherove...
>
Haven't read the book.. interesting guideline though. Wouldn't that
multiply the number of tests ?
e.g. if a single scenario exercises a test subject's interaction with
3 collaborators, wouldn't you have to write 3 tests (alternating which
collaborator gets to be the single mock each time) instead of 1 with
all collaborators as mocks.

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/testdrivendevelopment/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/testdrivendevelopment/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:testdrivendevelopment-digest <at> yahoogroups.com 
(Continue reading)

Gishu Pillai | 1 Oct 12:54 2009
Picon

RFC: Need volunteers to review content for a TDD workshop

The slides for my talk is shared here
http://docs.google.com/present/view?id=dcx49m86_22f2n8txcm

My motivation behind this was : "If you had just 6-8 hrs to sell and give a
rolling start on TDD to an audience (mixed expertise level)..."
I've collated whatever I could think of and recollect from all the various
books that I've read till now.

There also be 2 coding exercises in between where everyone gets some
hands-on time with TDD.

I'd like some eyeballs to spot
 - mistakes
 - better ways to rephrase / shorten something
 - omissions
- common questions / problems

I couldn't collate a FAQ list (ran out of time). If someone would like to
pitch in, I'd be happy to share access to the google doc. Just mail me your
google id (my email address is in the last slide)

Thanks
Gishu

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

(Continue reading)

Carlo Bottiglieri | 1 Oct 17:06 2009
Picon

Re: RFC: Need volunteers to review content for a TDD workshop

Hello Gishu.
Very dense. I liked it.
Just three quick suggestions :

- in the slides I read that (and I get the feeling that) refactoring
means "remove duplication". If I were asked (and I was asked) I would
indeed agree that one can trace back almost any design issue to some
kind of knowledge duplication, yet it might be misleading to just say
that, I suggest you make sure that you are very clear on just how
broad a scope the refactoring phase entails.

- I would add Koskela's book to the list of resources.

- I see that you group all of the design smells from Uncle Bob's book
in one slide, and similarly you group all design principles. I would
advise against this. Last time I had to go over those it took me 5 to
10 minutes each, just to explain them quickly, not in depth, just what
was strictly required to make them pass through.
Thus I would extend the number of slides and provide meaningful images
for each of the design smells and for each of the design principles,
otherwise you risk to have the audience stare at the same grey slide
for the better part of an hour, or, inversely, to drift too quickly
through those concepts, which is dangerous.

On Thu, Oct 1, 2009 at 12:54 PM, Gishu Pillai <gishu.pillai <at> gmail.com> wrote:
> The slides for my talk is shared here
> http://docs.google.com/present/view?id=dcx49m86_22f2n8txcm
>
> My motivation behind this was : "If you had just 6-8 hrs to sell and give a
> rolling start on TDD to an audience (mixed expertise level)..."
(Continue reading)

Donaldson, John (GEO | 1 Oct 19:20 2009
Picon

RE: RFC: Need volunteers to review content for a TDD workshop

Gishu,

Wow - first of all - good job - you hit all the main topics as far as I can see.

But...
I usually work on a rule of thumb of 2 minutes per slide, and your slides are going to take *much* longer than that.
I`d expand several of the slides (mocks+DI, patterns, principals, etc) into many slides.
The problem with that is that then you realize that 6 hours (including hands-on) is not going to fit.

(And I don't think you mentioned FIT by the way, or refactoring tools or IDEs that help).

So, I'd be left with reduce the content (but provide pointers), or stretch out to 2 days.

John D.

-----Original Message-----
From: testdrivendevelopment <at> yahoogroups.com [mailto:testdrivendevelopment <at> yahoogroups.com] On
Behalf Of Gishu Pillai
Sent: 01 October 2009 12:55
To: testdrivendevelopment <at> yahoogroups.com
Subject: [TDD] RFC: Need volunteers to review content for a TDD workshop

The slides for my talk is shared here
http://docs.google.com/present/view?id=dcx49m86_22f2n8txcm

My motivation behind this was : "If you had just 6-8 hrs to sell and give a
rolling start on TDD to an audience (mixed expertise level)..."
I've collated whatever I could think of and recollect from all the various
books that I've read till now.

(Continue reading)

Olof Bjarnason | 1 Oct 20:39 2009
Picon

Re: RFC: Need volunteers to review content for a TDD workshop

I think your presentation rocks - but you will not be able to get all point
across in one mere day.

I tried running half-aday presentation/handson (much like you), and then it
was only TDD without any SOLID or DRY, not to mention MVP or DI/mocks. While
I can blame some of the failure (no one picked up TDD) to my relatively
fresh look at TDD then (had done 6 months of TDD), it was also too short
time lapse.

The information you've compiled takes years to appreciate. It's like you're
presenting multi-variate calculus to folks who don't know how to solve 2nd
order equations yet! :)

2009/10/1 Gishu Pillai <gishu.pillai <at> gmail.com>

>
>
> The slides for my talk is shared here
> http://docs.google.com/present/view?id=dcx49m86_22f2n8txcm
>
> My motivation behind this was : "If you had just 6-8 hrs to sell and give a
> rolling start on TDD to an audience (mixed expertise level)..."
> I've collated whatever I could think of and recollect from all the various
> books that I've read till now.
>
> There also be 2 coding exercises in between where everyone gets some
> hands-on time with TDD.
>
> I'd like some eyeballs to spot
> - mistakes
(Continue reading)

Charlie Poole | 1 Oct 21:05 2009

RE: RFC: Need volunteers to review content for a TDD workshop

Hi Gishu,

It's a great effort with all the right stuff. I'll get to
the suggestions now. :-)

1) I think you have too much material for the time if
your objective is to teach TDD. I do Gui testing on
the third day of my TDD class.

2) If your goal is to inspire/motivate/convince rather
than teach, then you may not need all the material. Ask
yourself what factors would lead this particular audience
to decide in favor of trying TDD and *only* include that 
material.

3) If some material is included because you anticipate
objections, wait till people raise them - of course you
have to allow time for that. You can still prepare the
material that answers common objections but don't bring
it out until they are raised.

4) Split up your material into more slides. For example,
slide 7 "covers" seven principles of design in one slide.
Put them on separate slides and consider adding good and
bad examples to illustrate.

5) On the google site, your text doesn't it well on the
page - make sure it looks OK in your original presentation.

6) I like the slides that have graphical elements. Try
(Continue reading)

Charlie Poole | 1 Oct 20:50 2009

RE: RFC: Need volunteers to review content for a TDD workshop

Hi John, 

> Wow - first of all - good job - you hit all the main topics 
> as far as I can see.

Agreed.

> But...
> I usually work on a rule of thumb of 2 minutes per slide, and 
> your slides are going to take *much* longer than that.

In the usual "bullet point" style, I use the same guideline. But
since I read "Beyond Bullet Points" I tend to try to talk more
about each slide - and not have bullet points.

I've attended a day-long class by Ward Cunningham, which had
about 20 slides and it was - as you may imagine - quite good.

So, I think the slide count is up to the presenter.

However. I a slide is going to stay up a long time, while
the presenter speaks or exercises go on, I would tend to put
less info on one slide - perhaps a single point and accompanying
graphics.

> I`d expand several of the slides (mocks+DI, patterns, 
> principals, etc) into many slides.

Yes - many of the slides could be split.

(Continue reading)

Gishu Pillai | 2 Oct 08:02 2009
Picon

Re: RFC: Need volunteers to review content for a TDD workshop

 <at> Carlo
- Agreed, will rephrase to indicate refactoring not always = remove
duplication... although its a 80% case
- Koskela's book - Haven't read it yet.. Will make a note of that. The first
batch of attendees have a .net desktop app background.. but I have a Java
group attending in the future. I wanted that slide to be the absolute
minimal set of must-read books ; past history indicates reading doesn't come
easy to a majority of programmers :)

 <at> John, Carlo and Charlie
- A clear sign that compressing SOLID is a near-miss. Thanks for pointing
that out. My original take was to switch to a whiteboard, draw and talk with
the audience... (not in 2 min by a long shot); However I agree that this
needs more time and emphasis ; I guess just my mental block of someone
starting with a presentation that says 1/78 at the bottom right. Will get to
work on splitting atleast the SOLID priniciples out.
- I have a 20% confidence level of getting all this done in 1 day. I guess
will have to extend this to 2 days to avoid the audience tuning off with
info overload ; + they'll take their time to make and recover from mistakes
in the coding exercises, ask questions, et. all. I'm getting them to try
pairing as well for this so .. point noted. Have to do the right thing and
make it a 2-day workshop; Better for everyone concerned.
- I need to take a GUI example to connect with the audience. Past sessions
(the stack example) were quickly stereotyped as "toy examples". They like to
think that they're solving pretty complex problems (while I try to convince
them that the approach is the same) although countless other teams have
attempted similar things before

 <at> Nicolas and Charlie
- Thanks for pointing out the typos. Haven't yet reached the proofreading
(Continue reading)

Adam Sroka | 2 Oct 08:25 2009
Picon

Re: RFC: Need volunteers to review content for a TDD workshop

Hi Gishu:

I like it. I have been developing a similar presentation for my new
employer. While what I came up with is significantly different I
admire what you have done and think it is excellent.

Two points:

1) I agree with what others have said, too many concepts on one slide
and you risk that people won't get even one of them. This is
particularly a concern for the SOLID stuff. I would suggest that you
incorporate the principles into live examples only one (or perhaps
two) at a time. That is what has worked for me.

2) This is more of a detail oriented thing. On "TDD In One Slide" it
is not clear to me how the diagram relates to the text. If I were in
your presentation I would spend the whole time trying to figure that
out and not hear a word you said ;-) Perhaps something like
http://en.wikipedia.org/wiki/File:Test-driven_development.PNG which is
public domain, would be a better choice for that slide.

On Thu, Oct 1, 2009 at 3:54 AM, Gishu Pillai <gishu.pillai <at> gmail.com> wrote:
>
>
>
> The slides for my talk is shared here
> http://docs.google.com/present/view?id=dcx49m86_22f2n8txcm
>
> My motivation behind this was : "If you had just 6-8 hrs to sell and give a
> rolling start on TDD to an audience (mixed expertise level)..."
(Continue reading)


Gmane