Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

12
T Ashok Founder & CEO, STAG Software Architect-HBT in.linkedin.com/in/AshokSTAG ash_thiru Mar 24, 2012 “How many hairs do you have on your head?” Scientific approximations

description

As a professional tester, we encounter a variety of situations that require us to come up with a value/number. In these cases, we do find it difficult to deal with uncertainty, of those aspects whose “countability” is fuzzy. So the typical answers seem to be based on seat-of-the-pants approach. In the few cases where we’ve encountered a similar situation and solved it well, the estimates turn out to be correct, otherwise it’s simply a shot in the dark, praying to God that it turns out to be correct. Just because we don’t see a direct connect to this value does not mean that we resort to “guesswork”. What is needed is scientific approximation, the keyword is scientific. It is important to understand that an exact value may not be required, rather it is the reasoning that allows us to come up with a value, and constantly improving the reasoning to better the value. Scientific approximations are vital to good testing to estimate effort, data sizes, #users and so on. This talk is about understanding how we can do approximations scientifically. Try it on your head!

Transcript of Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

Page 1: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

T AshokFounder & CEO, STAG SoftwareArchitect-HBT

in.linkedin.com/in/AshokSTAG ash_thiru

Mar 24, 2012

“How many hairs do you have on your head?” Scientific approximations

Page 2: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

So what is the answer?

Page 3: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

SW Engg staff find it difficult to deal with uncertainty

... on aspects whose “countability” is fuzzy.

So the typical answers seem to be based on seat-of-the-pants approach.

In the few cases where we’ve encountered a similar situation and solved it well, the estimates turn out to be correct, otherwise it’s simply a shot in the dark, praying to God that it turns out to be correct.

Page 4: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

An exact value may not be required

... rather it is the reasoning that allows us to come up with a value, and constantly improving the reasoning to better the value.

Do not worry about PRECISION for now..

Page 5: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

Approximation is very natural to us.

It is in fact part of our instinct.

Think about this :...we do not take measured steps when we walk...we do not calculate the exact distance when reversing the car and so on

Our natural learning system continuously learns in the background and constantly adjusts the variables to refine the approximation.

Page 6: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

“How long would it take to cart Mount Fuji away with dump trucks, one truckload at a time?” Answer is expected to be given in a minute..

This book inspired me to develop the “Approximation Principle” that is a core concept in HBT(Hypothesis Based Testing).

Page 7: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

Scientific Approximations

“Approximation Principle” (a core concept in HBT)

The measure whose value is to be approximated is based on a set of parameters each having a varying sensitivity to the outcome, with a formula that binds these.

The value of the parameters needs to be hypothesised, if sensitive, needs to be tested and then the formula applied. Iterate based on learning and potential estimated variation.

1. Identify the various variables2. Connect them via a simple formula3. compute the first value4. Test the value quickly & 5. Refine

Page 8: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

Scientific approximations are vital to effective testing

.. to estimate effort..

... to estimate #test cases

... to estimate volume (data sizes)

... to estimate load and so on..

Page 9: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

Estimating #Test Cases(Functionality Test)

Test Case is a combination of inputsTC = {I1} x {I2} x {I3}

But it is bad idea to start from here!Let us step back..

To validate an entity under test, estimate #test scenarios (TS) & then TC.Test Scenario is a combination of conditions.

Using approximation of #TC/TS, estimate #TC.

What do you is the #TS?

Page 10: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

Estimating Data Volumes..

What is the volume of data that is typically created in year?

Page 11: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

Estimating Load

Depends on Operations, Users, #Trains, #Seats/#Berths/train...

Page 12: Bug deBug Chennai 2012 Talk - How many hairs do you have on your head by T Ashok

© 2012. STAG Software Private Limited. All rights reserved.

After trying it on your head,Use your head for doing this.

Cheers! Have a great conference.

Follow us @stagsoft

Check out our blog at www.stagsoftware.com/blog