Saturday, 16 June 2012

One question at a time

Taken from Agile Testing list:

If someone asks me a complete list I tend to ask what is your most valuable question you want to get answers now.
And because I am a man I can only do one thing at a time ;)
Pascal Dufour.
What a great way to describe the process of test automation.
Yes I now the context of this quote was completely unrelated to anything about testing, But it did ring a bell for me.

Where should I start?

A very common question I hear many time when I talk to people about the need to test their feature. Many times that not because they don’t know what needs to be tested. But because there are so many things to test that it gets a little overwhelming and from all the many things its really hard to know where to start.
So here’s an idea. Treat your tests as question you would like to get an answer for. Each test case ill reveal a piece of information about the feature you write telling you some specific a fact about how the system behaves.
for example when you test a trivial add method one question can be: I want to know how my method adds too positive integer values. another question could be: I want to know how my method deals with adding a negative value to a positive value. and so on.
The trick is to ask yourself:
what is your most valuable question you want to get answers now"
that should be the first test you write, and when you get an answer the next test should give you an answer for the next most valuable question. and you continue to write tests until you don’t have any more questions to ask.

only do one thing at a time

Does this sounds like one assert per test?
To me it does. and now I have a good answer when people asks me why just one assert per test.

Want to adopt Agile and don’t know where to start?
click here to learn


Anonymous said...

It is all about priority. ;)
Thanks for the post

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Walgreens Printable Coupons