57
The Testing Strategy Domenico Musto 2012 October

The Testing Strategy

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: The Testing Strategy

The Testing Strategy

Domenico Musto

2012 October

Page 2: The Testing Strategy
Page 3: The Testing Strategy

Who am I?

www.agiletour.com25/10/12

Page 4: The Testing Strategy

About me

www.agiletour.com25/10/12

Page 5: The Testing Strategy

Not about me

www.agiletour.com25/10/12

Page 6: The Testing Strategy

What do I do?

www.agiletour.com25/10/12

.NET

Web REST

AgileAutomation Testing

C#Team leading

@mimmozzo [email protected]

Ruby

Page 7: The Testing Strategy

Today we talk about..

www.agiletour.com25/10/12

• Differences between types of tests

• Tests and developers

• Tests and QA

Page 8: The Testing Strategy

..we don't talk about..

www.agiletour.com25/10/12

• Testing frameworks

• Libraries

Page 9: The Testing Strategy

The Agile Testing Quadrant

www.agiletour.com25/10/12

Page 10: The Testing Strategy

Technology facing

www.agiletour.com25/10/12

Page 11: The Testing Strategy

Types of tests

www.agiletour.com25/10/12

• Unit

• Functional

• Load

• Soak

Page 12: The Testing Strategy

Unit tests

www.agiletour.com25/10/12

• They test units of code in isolation

• Interaction between components

• Describe the behaviour

• Drive the design

• Fast execution

Page 13: The Testing Strategy

Be careful

www.agiletour.com25/10/12

• Test just public interfaces

• Do not abuse of mocking

Page 14: The Testing Strategy

www.agiletour.com25/10/12

Adding a new class is not the trigger for a new test.

The trigger is the implementation of a new requirement.

Page 15: The Testing Strategy

Functional tests

www.agiletour.com25/10/12

• They test the interaction with components outside the context of our application

• They assure integration

• They might be slow

Page 16: The Testing Strategy

www.agiletour.com25/10/12

public class When_getting_an_object_from_the_db

{

static int _objectId;

static DbWrapper _sut;

static object _object;

Establish that_there_is_an_object = ()=>

{

_objectId = 100;

ManuallyAddAnObjectInTheDb(_objectId);

}

Because we_get_the_object = ()=> _object = _sut.Get(_objectId);

It should_get_the_object = ()=> _object.ShouldNotBeNull();

}

Page 17: The Testing Strategy

www.agiletour.com25/10/12

public class When_storing_an_object_in_the_db

{

static int _objectId;

static DbWrapper _sut;

static object _object;

Establish we_have_an_object_to_save = ()=>

{

_objectId = 100;

}

Because we_save_the_object = ()=> _object = _sut.Save(_objectId);

It should_store_the_object = ()=> _sut.Get(_objectId).ShouldNotBeNull();

}

Page 18: The Testing Strategy

Be careful

www.agiletour.com25/10/12

• Do not mix tests

• Use context builders for data fixture

Page 19: The Testing Strategy

Load tests

www.agiletour.com25/10/12

• Feedback on performance

• Feedback on volume limit

• Complicated to write

• Slow execution

Page 20: The Testing Strategy

Soak tests

www.agiletour.com25/10/12

• Discover technologic issues

• Slow execution

Page 21: The Testing Strategy

Business facing

www.agiletour.com25/10/12

Page 22: The Testing Strategy

Types of tests

www.agiletour.com25/10/12

• End to end

• Integration

• Exploratory

Page 23: The Testing Strategy

End to end tests

www.agiletour.com25/10/12

• They test the whole scope of a feature

• They are acceptance tests

• Understandable from non-techincal persons

• Slow execution

Page 24: The Testing Strategy

www.agiletour.com25/10/12

They are not (only) interface tests.

Page 25: The Testing Strategy

Integration testswhen the end to end aren't brave enough

www.agiletour.com25/10/12

• They test pieces of the application

• They test the integration

• Slow execution

Page 26: The Testing Strategy

Exploratory tests

www.agiletour.com25/10/12

• Manual

• Look for feature limit

Page 27: The Testing Strategy

www.agiletour.com25/10/12

Let's implement a feature

Page 28: The Testing Strategy

The actors of the development process

www.agiletour.com25/10/12

• Developers

• QA

• Customer

Page 29: The Testing Strategy

The story

www.agiletour.com25/10/12

As a user of huddle I would like to add comments to tasks to collaborate better with my colleagues

Page 30: The Testing Strategy

www.agiletour.com25/10/12

Page 31: The Testing Strategy

www.agiletour.com25/10/12

Page 32: The Testing Strategy

www.agiletour.com25/10/12

Page 33: The Testing Strategy

www.agiletour.com25/10/12

Page 34: The Testing Strategy

www.agiletour.com25/10/12

Page 35: The Testing Strategy
Page 36: The Testing Strategy
Page 37: The Testing Strategy

www.agiletour.com25/10/12

df

Page 38: The Testing Strategy

www.agiletour.com25/10/12

The feature is ready

Page 39: The Testing Strategy

www.agiletour.com25/10/12

Page 40: The Testing Strategy

www.agiletour.com25/10/12

What about the tests ?!?!?!

Page 41: The Testing Strategy

www.agiletour.com25/10/12

Page 42: The Testing Strategy

www.agiletour.com25/10/12

When do I need to do end to end tests ?

Page 43: The Testing Strategy

www.agiletour.com25/10/12

Test plan

Page 44: The Testing Strategy

www.agiletour.com25/10/12

Page 45: The Testing Strategy

www.agiletour.com25/10/12

Page 46: The Testing Strategy

Test plan

www.agiletour.com25/10/12

• Acceptance tests

• Functional tests

• Integration tests

• Unit tests

Page 47: The Testing Strategy

www.agiletour.com25/10/12

Page 48: The Testing Strategy

www.agiletour.com25/10/12

Trade-off

Page 49: The Testing Strategy

Quality attributes

www.agiletour.com25/10/12

• Availability

• Modifiability

• Performance

• Security

•Testability• Usability

Page 50: The Testing Strategy

The test pyramid

www.agiletour.com25/10/12

Page 51: The Testing Strategy

www.agiletour.com25/10/12

QA Team

Page 52: The Testing Strategy

www.agiletour.com25/10/12

QA Team

Page 53: The Testing Strategy

www.agiletour.com25/10/12

QAs are part of the dev team

Page 54: The Testing Strategy

www.agiletour.com25/10/12

The reputation of the tests, of the build server and of the development environment

Page 55: The Testing Strategy

www.agiletour.com25/10/12

The deployment

Page 56: The Testing Strategy

www.agiletour.com25/10/12

Page 57: The Testing Strategy

www.agiletour.com25/10/12

Thanks. Q&A

@mimmozzo [email protected]