BDD practitioner journey

84 views
Skip to first unread message

Jorge Viana

unread,
Jan 29, 2018, 12:31:22 PM1/29/18
to Behaviour Driven Development
Hi there,

I have one question that may sound kind of silly, but here it goes.

Every time I tried BDD (or even TDD) it seems that I'm testing one function or method, like in some toy examples I've seen where BDD is showcased when writing a simple calculator.

It seems that I have a tendency to start from the bottom, and not see the whole, like it is advised in BDD and in books like 'Growing Object-Oriented Software, Guided by Tests'.

This is a bit annoying and I seem not being able to get rid of it. Did anyone experienced the same? Any thoughts?

Thanks for listening.
Jorge

George Dinwiddie

unread,
Jan 29, 2018, 1:01:43 PM1/29/18
to behaviordriv...@googlegroups.com
Hi, Jorge,

It's like the difference between top-down and bottom-up programming. If
you start with what the customer/user wants, then you're working outside
in from the stated desires. I tend to drop down to the detailed
programmer level pretty quickly, but with that high-level scenario
guiding my work. See https://github.com/gdinwiddie/EquineHoroscope for
an example.

What's it like for you?

- George
> --
> You received this message because you are subscribed to the Google
> Groups "Behaviour Driven Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to behaviordrivendeve...@googlegroups.com
> <mailto:behaviordrivendeve...@googlegroups.com>.
> To post to this group, send email to
> behaviordriv...@googlegroups.com
> <mailto:behaviordriv...@googlegroups.com>.
> Visit this group at
> https://groups.google.com/group/behaviordrivendevelopment.
> For more options, visit https://groups.google.com/d/optout.

--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------

Jorge Viana

unread,
Jan 29, 2018, 1:17:14 PM1/29/18
to Behaviour Driven Development
Hi George,

I guess I try from the bottom up, or just with simple examples that always stay at the bottom... , because the complexity when it comes to work with temporal coupling (eg., a customer makes an order on a specific date) or a dependency on a service or database (use real or mock?, how to configure all moving parts when testing?) it's still a bit hard for me.
> To post to this group, send email to
> behaviordriv...@googlegroups.com

George Dinwiddie

unread,
Jan 29, 2018, 1:55:53 PM1/29/18
to behaviordriv...@googlegroups.com
Jorge,

What is it that the business or customer wants? How do they describe
their desires?

- George
> behaviordrivendeve...@googlegroups.com <javascript:>
> > <mailto:behaviordrivendeve...@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > behaviordriv...@googlegroups.com <javascript:>
> > <mailto:behaviordriv...@googlegroups.com <javascript:>>.
> <https://groups.google.com/group/behaviordrivendevelopment>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
>
> ----------------------------------------------------------------------
>    * George Dinwiddie * http://blog.gdinwiddie.com
>    Software Development http://www.idiacomputing.com
>    Consultant and Coach http://www.agilemaryland.org
>
> ----------------------------------------------------------------------
>
> --
> You received this message because you are subscribed to the Google
> Groups "Behaviour Driven Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to behaviordrivendeve...@googlegroups.com
> <mailto:behaviordrivendeve...@googlegroups.com>.
> To post to this group, send email to
> behaviordriv...@googlegroups.com
> <mailto:behaviordriv...@googlegroups.com>.

Jorge Viana

unread,
Feb 1, 2018, 3:18:57 PM2/1/18
to Behaviour Driven Development
I see what you mean... I guess our team needs an agile coach to help us going back on good track...
>     <javascript:>>.
>      > To post to this group, send email to
>      > behaviordriv...@googlegroups.com <javascript:>
>      > <mailto:behaviordrivendevelopme...@googlegroups.com <javascript:>>.
>      > Visit this group at
>      > https://groups.google.com/group/behaviordrivendevelopment
>     <https://groups.google.com/group/behaviordrivendevelopment>.
>      > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
>     --
>      
>     ----------------------------------------------------------------------
>         * George Dinwiddie * http://blog.gdinwiddie.com
>         Software Development http://www.idiacomputing.com
>         Consultant and Coach http://www.agilemaryland.org
>      
>     ----------------------------------------------------------------------
>
> --
> You received this message because you are subscribed to the Google
> Groups "Behaviour Driven Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> To post to this group, send email to
> behaviordriv...@googlegroups.com

George Dinwiddie

unread,
Feb 1, 2018, 3:26:30 PM2/1/18
to behaviordriv...@googlegroups.com
Jorge,

I can do a little free coaching via this list, if you'd like to walk
through it.

- George
> > behaviordrivendeve...@googlegroups.com
> <javascript:> <javascript:>
> >      >
> <mailto:behaviordrivendeve...@googlegroups.com
> <javascript:>
> >     <javascript:>>.
> >      > To post to this group, send email to
> >      > behaviordriv...@googlegroups.com <javascript:>
> >      > <mailto:behaviordriv...@googlegroups.com
> <javascript:> <javascript:>>.
> >      > Visit this group at
> >      > https://groups.google.com/group/behaviordrivendevelopment
> <https://groups.google.com/group/behaviordrivendevelopment>
> >     <https://groups.google.com/group/behaviordrivendevelopment
> <https://groups.google.com/group/behaviordrivendevelopment>>.
> >      > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> >     <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> >
> >     --
> >
> >
> ----------------------------------------------------------------------
> >         * George Dinwiddie * http://blog.gdinwiddie.com
> >         Software Development http://www.idiacomputing.com
> >         Consultant and Coach http://www.agilemaryland.org
> >
> >
> ----------------------------------------------------------------------
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Behaviour Driven Development" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to
> behaviordrivendeve...@googlegroups.com <javascript:>
> > <mailto:behaviordrivendeve...@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > behaviordriv...@googlegroups.com <javascript:>
> > <mailto:behaviordriv...@googlegroups.com <javascript:>>.
> > Visit this group at
> > https://groups.google.com/group/behaviordrivendevelopment
> <https://groups.google.com/group/behaviordrivendevelopment>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
>
> ----------------------------------------------------------------------
>    * George Dinwiddie * http://blog.gdinwiddie.com
>    Software Development http://www.idiacomputing.com
>    Consultant and Coach http://www.agilemaryland.org
>
> ----------------------------------------------------------------------
>
> --
> You received this message because you are subscribed to the Google
> Groups "Behaviour Driven Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to behaviordrivendeve...@googlegroups.com
> <mailto:behaviordrivendeve...@googlegroups.com>.
> To post to this group, send email to
> behaviordriv...@googlegroups.com
> <mailto:behaviordriv...@googlegroups.com>.

Jorge Viana

unread,
Feb 1, 2018, 4:11:45 PM2/1/18
to Behaviour Driven Development
That's really kind of you. Let me just give you a bit of background about my "frustration" with software right now.

In our project at our company, we are not writing clean code, developers are not testing so well, sometimes they don't even test (including me, of course) because things are getting hairy. We have some acceptance tests that they call it BDD but they are not... Are written after the fact and don't involve the "three amigos"...

Even though I try to learn TDD and BDD concepts it's really hard for me to introduce it in the project, it seems to complicated now that many (bad?) decisions are already made.

The alternative I see, is trying to learn BDD with my own pet project. I think I should try to create some Github repository with Travis integration and give it a try. But I get lost easily and don't focus: I think Github, Travis, then I think SonarQube and all the things (Continuous Delivery, BDD, TDD, Clean Code, you name it) that I would like to master when building a pet project and my energy drops as my frustration grows.

Always wanted to get in a team with really strong coaching to help me getting better, but that never happened so I'm a bit alone on this.
>      > behaviordrivendevelopment+unsub...@googlegroups.com
>     <javascript:> <javascript:>
>      >      >
>     <mailto:behaviordrivendevelopment+unsubscribe@googlegroups.com
>     <javascript:>
>      >     <javascript:>>.
>      >      > To post to this group, send email to
>      >      > behaviordriv...@googlegroups.com <javascript:>
>      >      > <mailto:behaviordrivendevelopme...@googlegroups.com
>     <javascript:> <javascript:>>.
>      >      > Visit this group at
>      >      > https://groups.google.com/group/behaviordrivendevelopment
>     <https://groups.google.com/group/behaviordrivendevelopment>
>      >     <https://groups.google.com/group/behaviordrivendevelopment
>     <https://groups.google.com/group/behaviordrivendevelopment>>.
>      >      > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>
>      >     <https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>>.
>      >
>      >     --
>      >
>      >    
>     ----------------------------------------------------------------------
>      >         * George Dinwiddie * http://blog.gdinwiddie.com
>      >         Software Development http://www.idiacomputing.com
>      >         Consultant and Coach http://www.agilemaryland.org
>      >
>      >    
>     ----------------------------------------------------------------------
>      >
>      > --
>      > You received this message because you are subscribed to the Google
>      > Groups "Behaviour Driven Development" group.
>      > To unsubscribe from this group and stop receiving emails from it,
>     send
>      > an email to
>     <javascript:>>.
>      > To post to this group, send email to
>      > behaviordriv...@googlegroups.com <javascript:>
>      > <mailto:behaviordrivendevelopme...@googlegroups.com <javascript:>>.
>      > Visit this group at
>      > https://groups.google.com/group/behaviordrivendevelopment
>     <https://groups.google.com/group/behaviordrivendevelopment>.
>      > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
>     --
>      
>     ----------------------------------------------------------------------
>         * George Dinwiddie * http://blog.gdinwiddie.com
>         Software Development http://www.idiacomputing.com
>         Consultant and Coach http://www.agilemaryland.org
>      
>     ----------------------------------------------------------------------
>
> --
> You received this message because you are subscribed to the Google
> Groups "Behaviour Driven Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> To post to this group, send email to
> behaviordriv...@googlegroups.com

George Dinwiddie

unread,
Feb 1, 2018, 4:32:10 PM2/1/18
to behaviordriv...@googlegroups.com
Jorge,

I understand your frustration. When I learned TDD, I couldn't talk
anyone else into it. I still used TDD on the code I developed, running
the tests manually at first since it wasn't part of the official build.
I was doing what was called "Extreme Programming for One" in those days.

I met someone a few years back who told me that, over 10 years later, my
code and tests were still there.

My advice is to start small and learn what you can. Whether that's at
work, on a side project, or both, is up to you. Build automation isn't
necessary to get started. Having someone who will talk things through is
a help. I had people on the Extreme Programming mailing list when I started.

- George

Adam Sroka

unread,
Feb 1, 2018, 5:06:53 PM2/1/18
to behaviordriv...@googlegroups.com
It is indeed quite difficult to learn TDD and BDD on an existing project with untested code. In fact, the genesis of modern TDD was the realization by the C3 folks (considered the first Extreme Programming team) that testing after the fact caused a lot of rewriting. 

I got lucky. In early 2000 I was working for a startup in Maryland. I had a two hour commute by bus and train and I did a lot of reading. One of the books I read was the first edition of Extreme Programming Explained. Not long after that we got a new CEO, and he commanded that all of our systems be rewritten in Java. So, we had to learn Java and we had to recreate a bunch of code that we already understood pretty well. TDD was a very good fit for that (even though rewriting those systems was a dumb idea… at least I got paid to learn…) 

Using a side project and starting with TDD from day one is a good way to learn. I still do that from time to time. 

It isn’t necessary to learn Travis or Jenkins, etc. All that those tools do is pick up changes and run a script. You can use TDD for that part too. You just need to ask yourself how you would know if the build/deploy steps worked, write a test for that, and then make it pass. 

>      > <mailto:behaviordrivendevelopment+unsubscribe@googlegroups.com
>     <javascript:>>.
>      > To post to this group, send email to
>      > behaviordriv...@googlegroups.com <javascript:>
>      > <mailto:behaviordrivendevelopme...@googlegroups.com <javascript:>>.
>      > Visit this group at
>      > https://groups.google.com/group/behaviordrivendevelopment
>     <https://groups.google.com/group/behaviordrivendevelopment>.
>      > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
>     --
>      
>     ----------------------------------------------------------------------
>         * George Dinwiddie * http://blog.gdinwiddie.com
>         Software Development http://www.idiacomputing.com
>         Consultant and Coach http://www.agilemaryland.org
>      
>     ----------------------------------------------------------------------
>
> --
> You received this message because you are subscribed to the Google
> Groups "Behaviour Driven Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> <mailto:behaviordrivendevelopment+unsubscribe@googlegroups.com>.
> To post to this group, send email to
> behaviordriv...@googlegroups.com
> <mailto:behaviordrivendevelopme...@googlegroups.com>.
> Visit this group at
> https://groups.google.com/group/behaviordrivendevelopment.
> For more options, visit https://groups.google.com/d/optout.

--
  ----------------------------------------------------------------------
   * George Dinwiddie *                      http://blog.gdinwiddie.com
   Software Development                    http://www.idiacomputing.com
   Consultant and Coach                    http://www.agilemaryland.org
  ----------------------------------------------------------------------

--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordrivendevelopment@googlegroups.com.

Jorge Viana

unread,
Feb 1, 2018, 5:17:54 PM2/1/18
to Behaviour Driven Development
Will find time and a pet project :) I hope...
>      > <mailto:behaviordrivendevelopment+unsubscribe@googlegroups.com
>     <javascript:>>.
>      > To post to this group, send email to
>      > behaviordriv...@googlegroups.com <javascript:>
>      > <mailto:behaviordrivendevelopme...@googlegroups.com <javascript:>>.
>      > Visit this group at
>      > https://groups.google.com/group/behaviordrivendevelopment
>     <https://groups.google.com/group/behaviordrivendevelopment>.
>      > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
>     --
>      
>     ----------------------------------------------------------------------
>         * George Dinwiddie * http://blog.gdinwiddie.com
>         Software Development http://www.idiacomputing.com
>         Consultant and Coach http://www.agilemaryland.org
>      
>     ----------------------------------------------------------------------
>
> --
> You received this message because you are subscribed to the Google
> Groups "Behaviour Driven Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> <mailto:behaviordrivendevelopment+unsubscribe@googlegroups.com>.
> To post to this group, send email to
> behaviordriv...@googlegroups.com
> <mailto:behaviordrivendevelopme...@googlegroups.com>.
> Visit this group at
> https://groups.google.com/group/behaviordrivendevelopment.
> For more options, visit https://groups.google.com/d/optout.

--
  ----------------------------------------------------------------------
   * George Dinwiddie *                      http://blog.gdinwiddie.com
   Software Development                    http://www.idiacomputing.com
   Consultant and Coach                    http://www.agilemaryland.org
  ----------------------------------------------------------------------

--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.

Liz Keogh

unread,
Feb 2, 2018, 7:23:08 AM2/2/18
to behaviordriv...@googlegroups.com
Hi Jorge,

If you want to have a go with something simple and fun, I wrote a version of Conway's Game of Life in Kotlin (JVM so you can use any Java-based language). It even has a front end written in JavaFX.

The "master" branch has my front end all wired up, along with the first Cucumber-JVM scenarios. There's an empty directory for you to add lower-level tests. If you run it and try to click anything, you'll get an error that will help to guide you.

Note that everything should be passed through one of the Event queues; the front-end will request things from the back-end, and the back-end will notify the front end of changes. You have to subscribe to the queues, respond to requests, and publish notifications when things change. The "solution" branch contains my solution in case you get stuck.

That should get you started without the overhead of having to do everything yourself, and will give you a template for other projects of your own.

Cheers,
Liz.


>      > <mailto:behaviordrivendevelopment+unsubscribe@googlegroups.com
>     <javascript:>>.
>      > To post to this group, send email to
>      > behaviordriv...@googlegroups.com <javascript:>
>      > <mailto:behaviordrivendevelopme...@googlegroups.com <javascript:>>.
>      > Visit this group at
>      > https://groups.google.com/group/behaviordrivendevelopment
>     <https://groups.google.com/group/behaviordrivendevelopment>.
>      > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
>     --
>      
>     ----------------------------------------------------------------------
>         * George Dinwiddie * http://blog.gdinwiddie.com
>         Software Development http://www.idiacomputing.com
>         Consultant and Coach http://www.agilemaryland.org
>      
>     ----------------------------------------------------------------------
>
> --
> You received this message because you are subscribed to the Google
> Groups "Behaviour Driven Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> <mailto:behaviordrivendevelopment+unsubscribe@googlegroups.com>.
> To post to this group, send email to
> behaviordriv...@googlegroups.com
> <mailto:behaviordrivendevelopme...@googlegroups.com>.
> Visit this group at
> https://groups.google.com/group/behaviordrivendevelopment.
> For more options, visit https://groups.google.com/d/optout.

--
  ----------------------------------------------------------------------
   * George Dinwiddie *                      http://blog.gdinwiddie.com
   Software Development                    http://www.idiacomputing.com
   Consultant and Coach                    http://www.agilemaryland.org
  ----------------------------------------------------------------------

--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordrivendevelopment@googlegroups.com.

Jorge Viana

unread,
Feb 5, 2018, 3:21:24 PM2/5/18
to Behaviour Driven Development
Thank you for your replies!

I definitely need to get my hands dirty and stop complaining... Not sure yet which example I will follow.

I picked up again one book that I enjoyed reading long long ago. Back then I though I had understood many of the concepts. So if in the mean time I still cannot do BDD it's because I'm no good. That's what I've been thinking for a while now.
The book is BDD in Action by John Fergusson Smart.
This reminds me that I cannot pickup things up, even if they are not so complicated, easily. I need to read, re-read, think about it, being frustrated, being afraid of trying....
I find it funny that this second time reading it seems that I understood things a bit better.

So, if anybody reading this and being a novice, the thing I can tell and that I seemed to forget is: perseverance!

This being said, I'll try to follow one of the examples proposed here, or being easier to start, trying to implement similar examples from the book, which is great by the way.

See you soon.

>      > <mailto:behaviordrivendevelopment+unsubscribe@googlegroups.com
>     <javascript:>>.
>      > To post to this group, send email to
>      > behaviordriv...@googlegroups.com <javascript:>
>      > <mailto:behaviordrivendevelopme...@googlegroups.com <javascript:>>.
>      > Visit this group at
>      > https://groups.google.com/group/behaviordrivendevelopment
>     <https://groups.google.com/group/behaviordrivendevelopment>.
>      > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
>     --
>      
>     ----------------------------------------------------------------------
>         * George Dinwiddie * http://blog.gdinwiddie.com
>         Software Development http://www.idiacomputing.com
>         Consultant and Coach http://www.agilemaryland.org
>      
>     ----------------------------------------------------------------------
>
> --
> You received this message because you are subscribed to the Google
> Groups "Behaviour Driven Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> <mailto:behaviordrivendevelopment+unsubscribe@googlegroups.com>.
> To post to this group, send email to
> behaviordriv...@googlegroups.com
> <mailto:behaviordrivendevelopme...@googlegroups.com>.
> Visit this group at
> https://groups.google.com/group/behaviordrivendevelopment.
> For more options, visit https://groups.google.com/d/optout.

--
  ----------------------------------------------------------------------
   * George Dinwiddie *                      http://blog.gdinwiddie.com
   Software Development                    http://www.idiacomputing.com
   Consultant and Coach                    http://www.agilemaryland.org
  ----------------------------------------------------------------------

--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendevelopment+unsub...@googlegroups.com.
To post to this group, send email to behaviordriv...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages