The Testing Strategy

Preview:

DESCRIPTION

 

Citation preview

The Testing Strategy

Domenico Musto

2012 October

Who am I?

www.agiletour.com25/10/12

About me

www.agiletour.com25/10/12

Not about me

www.agiletour.com25/10/12

What do I do?

www.agiletour.com25/10/12

.NET

Web REST

AgileAutomation Testing

C#Team leading

@mimmozzo domenico.musto@gmail.com

Ruby

Today we talk about..

www.agiletour.com25/10/12

• Differences between types of tests

• Tests and developers

• Tests and QA

..we don't talk about..

www.agiletour.com25/10/12

• Testing frameworks

• Libraries

The Agile Testing Quadrant

www.agiletour.com25/10/12

Technology facing

www.agiletour.com25/10/12

Types of tests

www.agiletour.com25/10/12

• Unit

• Functional

• Load

• Soak

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

Be careful

www.agiletour.com25/10/12

• Test just public interfaces

• Do not abuse of mocking

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.

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

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();

}

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();

}

Be careful

www.agiletour.com25/10/12

• Do not mix tests

• Use context builders for data fixture

Load tests

www.agiletour.com25/10/12

• Feedback on performance

• Feedback on volume limit

• Complicated to write

• Slow execution

Soak tests

www.agiletour.com25/10/12

• Discover technologic issues

• Slow execution

Business facing

www.agiletour.com25/10/12

Types of tests

www.agiletour.com25/10/12

• End to end

• Integration

• Exploratory

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

www.agiletour.com25/10/12

They are not (only) interface tests.

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

Exploratory tests

www.agiletour.com25/10/12

• Manual

• Look for feature limit

www.agiletour.com25/10/12

Let's implement a feature

The actors of the development process

www.agiletour.com25/10/12

• Developers

• QA

• Customer

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

www.agiletour.com25/10/12

www.agiletour.com25/10/12

www.agiletour.com25/10/12

www.agiletour.com25/10/12

www.agiletour.com25/10/12

www.agiletour.com25/10/12

df

www.agiletour.com25/10/12

The feature is ready

www.agiletour.com25/10/12

www.agiletour.com25/10/12

What about the tests ?!?!?!

www.agiletour.com25/10/12

www.agiletour.com25/10/12

When do I need to do end to end tests ?

www.agiletour.com25/10/12

Test plan

www.agiletour.com25/10/12

www.agiletour.com25/10/12

Test plan

www.agiletour.com25/10/12

• Acceptance tests

• Functional tests

• Integration tests

• Unit tests

www.agiletour.com25/10/12

www.agiletour.com25/10/12

Trade-off

Quality attributes

www.agiletour.com25/10/12

• Availability

• Modifiability

• Performance

• Security

•Testability• Usability

The test pyramid

www.agiletour.com25/10/12

www.agiletour.com25/10/12

QA Team

www.agiletour.com25/10/12

QA Team

www.agiletour.com25/10/12

QAs are part of the dev team

www.agiletour.com25/10/12

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

www.agiletour.com25/10/12

The deployment

www.agiletour.com25/10/12

www.agiletour.com25/10/12

Thanks. Q&A

@mimmozzo domenico.musto@gmail.com

Recommended