[TIP] Testing Hierarchy

tarjei tarjei at nu.no
Tue Jul 21 00:44:12 PDT 2009


Hi,

>
> That is a good presentation.  In an earlier thread I mentioned how I was
> frustrated at the lack of real world theory with testing.  I think this
> presentation could go a tad further and identify not only the type of
> testing, but the levels of testing quality vs "the real world".  The
> saying you can have two of the three, "cheap, fast, or quality", but not
> all three comes mind.
>
> It is very easy to say all code should have 100% unit test coverage,
> have integration tests, functional tests, etc.  What I haven't seen
> someone talk about yet, is when that is appropriate in the real world
> and when it isn't, and an honest assessment of the tradeoff.  I am very
> sold on testing code, but how much depends on the situation I am in.
I just thought I'd note that Kent Beck has also been thinking about this[1].

1. http://www.threeriversinstitute.org/JustShip.html

I've mainly been developing in Java lately, where I often end up doing 
three levels of tests:

1. Pure unit tests
2. In-memory functional tests
3. Functional tests against the real thing (MySQL for example)

Often I find a lot of bugs in the second phase that don't show up in the 
first due to lack of imagination (I never excelled at arts).

The problem with functional tests is that they take a lot of time to 
create and setup. But IMHO they often provide a greater value. By 
reducing the time they take to setup and run by using memory based 
alternatives the trade off becomes smaller.

Kind regards,
Tarjei





>
> PyCon 2010 Grig and Titus?
>
>
>     - t.
>
>     On Mon, Jul 20, 2009 at 12:12 PM, Paul
>     Hildebrandt<Paul.Hildebrandt at disneyanimation.com
>     <mailto:Paul.Hildebrandt at disneyanimation.com>> wrote:
>      > I am preparing to give a talk on Python unit testing to our
>     software team.
>      > I remember at the PyCon Testing BOF someone showed a Testing
>     Hierarchy
>      > slide.  It shows the different types of testing and where unit
>     tests fit
>      > in.  I thought it was clever and want to borrow it.  Does anyone
>     have a link
>      > to it.
>      >
>      > Paul
>      >
>      > --
>      >
>      > _______________________________________________
>      > testing-in-python mailing list
>      > testing-in-python at lists.idyll.org
>     <mailto:testing-in-python at lists.idyll.org>
>      > http://lists.idyll.org/listinfo/testing-in-python
>      >
>      >
>
>     _______________________________________________
>     testing-in-python mailing list
>     testing-in-python at lists.idyll.org
>     <mailto:testing-in-python at lists.idyll.org>
>     http://lists.idyll.org/listinfo/testing-in-python
>
>
>
>
> --
> Thanks,
>
> Noah
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python


-- 
Tarjei Huse
Mobil: 920 63 413



More information about the testing-in-python mailing list