Testing in a continuous delivery environment

32
Testing in a Continuous Delivery Environment Siddharth Somasundaram Stefan Verhoeff

description

Talk at Iqnite conference for software quality and testing about how we have do continuous delivery at here.com Together with Siddharth Somasundaram http://www.iqnite-conferences.com/suisse/programme/programme.aspx

Transcript of Testing in a continuous delivery environment

Page 1: Testing in a continuous delivery environment

Testing in a Continuous Delivery

EnvironmentSiddharth Somasundaram

Stefan Verhoeff

Page 2: Testing in a continuous delivery environment

HERE

● Formerly known as Nokia / NAVTEQ Maps

● Powers Bing, Facebook and Yahoo Maps

● 4 out of every 5 cars with in-dash navigation are

powered by HERE

Page 3: Testing in a continuous delivery environment

HERE

● Maps on the Web offering here.com

Page 4: Testing in a continuous delivery environment

Testing Before Agile

● Testers are only involved in the later stage

● Long regression testing cycle before release

● Developers and Testers have separate work streams

○ Leads to conflicts between them

● Business pressure to release the software

○ Compromise on quality?

Page 5: Testing in a continuous delivery environment

Importance of Agile

● Requirements change over time

● Testers are part of the planning process

● The entire team is responsible for Quality

● Faster release cycle

○ From once every 3 months to daily releases

Page 6: Testing in a continuous delivery environment

Continuous Delivery

● Release early and often to production

● Automate testing and deployment

● Faster feedback, reduce risks and overhead for releasing

● Hot trend in the industry, especially web companies

Page 7: Testing in a continuous delivery environment

But what about Quality Assurance?

● Lots of automation for regression testing

● Build enough trust in the test coverage

● Focus shifts from prevention of bugs to rapid discovery

and resolution

● Exploratory testing can be decoupled from releasing

Page 8: Testing in a continuous delivery environment

How do we do it?● Team Culture and Technical practices we found to be useful

Page 9: Testing in a continuous delivery environment

Team Culture Practices

● One agile Team, One Product and One Goal

○ Product Owner

○ Scrum Master

○ Developers / Testers

○ Offshore teams

● Communication solves most of the problems

Page 10: Testing in a continuous delivery environment

Collaborate using Work Agreements

The team formulates rules and hold each other

accountable. For example:

● Running tests before committing

● No commits on red build

● First priority is to keep the build green

Page 11: Testing in a continuous delivery environment

Build Monitor visible in every room

Page 12: Testing in a continuous delivery environment

Pair Programming

Page 13: Testing in a continuous delivery environment

Share knowledge with Tech Talks

Page 14: Testing in a continuous delivery environment

Combine developer and operation teams

Page 15: Testing in a continuous delivery environment

Technical Practices

Page 16: Testing in a continuous delivery environment

Continuous Integration

Page 17: Testing in a continuous delivery environment

Test Driven Development● Code and tests are developed at the same time

Page 18: Testing in a continuous delivery environment

Build Pipeline

Page 19: Testing in a continuous delivery environment

Test Coverage at all levels

© Alister Scott http://watirmelon.com/2011/06/10/yet-another-software-testing-pyramid/

Page 20: Testing in a continuous delivery environment

Eliminate Flaky Tests

● Essential to keep the team

trusting the test results

● Mocking dependencies

Page 21: Testing in a continuous delivery environment

Feature Flags

● No branching

○ Prevent integration problems

○ Quality built in

● Turn features on in production

when they are ready

● Quality boundaries for

different release stages

Page 22: Testing in a continuous delivery environment

Logging & Monitoring

● What happens after we go live?

● Production monitoring ensures edge cases are covered

● Real-time metrics for: system, application, business

Page 23: Testing in a continuous delivery environment

Logging & Monitoring

● Quickly responding to alerts

● Production is the ultimate proof the code works

Bug introduced We fixed it :-)

Page 24: Testing in a continuous delivery environment

In Conclusion...

Page 25: Testing in a continuous delivery environment

Is it Successful? The Metrics

2010 Now

Release quarterly Release daily

Mostly manual testing 7000+ unit tests, 400+ GUI tests

Preparing release takes weeks

Release package ready in 45 minutes

Deployment takes days Deploy 3 sites in 10 minutes

Management signoff required

Team empowered to make changes

Page 26: Testing in a continuous delivery environment

Deployments 2012 vs 2013

Page 27: Testing in a continuous delivery environment

Business Benefits

● Reduce risk involved in big changes

● Reduce time to market

● Smaller more frequent feature rollouts

● Quickly learn from feedback on product changes

Page 28: Testing in a continuous delivery environment

Business Benefits

● Predictable releases

● Improved team morale

○ Less time spend in stressful firefighting

○ Less bug fixing, more feature delivery

○ Satisfaction of delivering to the customer

Page 29: Testing in a continuous delivery environment

Challenges

● Everybody agreeing on the process

● Discipline comes over time only

● Feedback needs to be given quickly

● High investment in test automation and keeping it

running smoothly

● Need to react to incidents quickly

Page 30: Testing in a continuous delivery environment

Future Plans

● Deploy every build to production

● Keep on investing in Automation and Monitoring

● Canary deployments to validate new releases before

global rollout

● Leverage quick cycle time for A/B testing driven feature

development

Page 31: Testing in a continuous delivery environment

HERE ChecklistTeam Culture

● One Team

● Work Agreements

● Build Monitor in the

room

● Pair Programming

● Tech Talks

● DevOps

Technical

● Continuous Integration

● Test Driven Development

● Build Pipeline

● Test Coverage on all

levels

● Feature Flags

● Logging & Monitoring

Page 32: Testing in a continuous delivery environment

Merci BeaucoupThank You

Danke SchönGrazie