no devops without continuous testing

30
No DevOps Without Continuous Testing Arthur Hicken - Parasoft 1

Upload: parasoft

Post on 16-Apr-2017

588 views

Category:

Software


1 download

TRANSCRIPT

Page 1: No Devops Without Continuous Testing

No DevOps Without

Continuous Testing

Arthur Hicken - Parasoft

1

Page 2: No Devops Without Continuous Testing

Your PresenterArthur Hicken is Chief Evangelist at

Parasoft where he has been involved in

automating various software development

and testing practices for over 20 years.

He has worked on projects including

cybersecurity, database development, the

software development lifecycle, web

publishing and monitoring, and integration

with legacy systems and maintains the IoT

Hall-of-Shame http://bit.ly/iotshame and

SQLi Hall-of-Shame http://bit.ly/sqlishame

Follow him @codecurmudgeon

Blog: http://codecurmudgeon.com

Web: http://parasoft.com

Page 3: No Devops Without Continuous Testing

Agenda

• What the shift from automated to

continuous means

• How disruption requires changes to how

we test software

• Addressing gaps between Dev and Ops

• Technologies that enable Continuous

www.iist.org 3www.psqtconference.com

Page 4: No Devops Without Continuous Testing

Continuous

4www.psqtconference.com

• Build, Integration, Testing, Release,

Delivery, Deployment

• Builds on DevOps movement

• Enables DevOps reality

• High dependency on automation:

– processes

– assessment

– decisions

Page 5: No Devops Without Continuous Testing

DevOps

“DevOps is the practice of operations and

development engineers participating

together in the entire service lifecycle, from

design through the development

process to production support.”

– The Agile Admin

• No more throwing code over the wall

• Design for deployment

5www.psqtconference.com

Page 6: No Devops Without Continuous Testing

DevOps Pipeline

6www.psqtconference.com

Page 7: No Devops Without Continuous Testing

Automated vs Continuous

• Just being automated isn’t continuous

• Scheduling / frequency

• Intermittent manual dependencies

• Decisions points

– Is it done?

– Is it good?

– Is it safe?

– Can I push it out the door?

7www.psqtconference.com

Page 8: No Devops Without Continuous Testing

Complexity a Barrier to Testing

3rd Party System

Evolving ComponentMainframe

Scheduled Access

Page 9: No Devops Without Continuous Testing

API Economy

Pieces/Parts come from everywhere

Definitions changing (upgrades, new versions)

Not always available

Can’t test with real data without causing problems

9www.psqtconference.com

Page 10: No Devops Without Continuous Testing

We must Re-invent Test

• The penalty for faulty software is

increasing

– Brand erosion

– All industries at risk for total transformation

• Technology is faster and more distributed

– Containers

– Microservices

Page 11: No Devops Without Continuous Testing

Fixed Fixed

Impact of Test in the Evolving

SDLC

Plan Develop Build Test Release

Test as a time-boxed event is the prevailing method

“Are we done testing?”

Page 12: No Devops Without Continuous Testing

Impact of Test in Evolving SDLC

Plan Develop

Bu

ildTe

st

Release

Bu

ildTe

st

Bu

ildTe

st

Bu

ildTe

st

Bu

ildTe

st

Bu

ildTe

st

Bu

ildTe

st

Bu

ildTe

st

Bu

ildTe

st

Bu

ildTe

st

Bu

ildTest

“Does the release candidate have an

acceptable level of risk?”

Page 13: No Devops Without Continuous Testing

Gaps between Dev and Ops

What is “done”?

Fully testing with external dependencies

Full environments and all their variants

13www.psqtconference.com

Page 14: No Devops Without Continuous Testing

Speed of Deployments

Rapid deployments

Deliver features and bug fixes

Deployments outpace ability to test

Too many changes

Since we didn’t test enough, Devs are mired in bug fixes

Glitches and outages can happen

14www.psqtconference.com

Page 15: No Devops Without Continuous Testing

QA and Testing

• Cannot keep up with the rate of change

• Quality lags behind

• Do we even know what to test?

• Complex technologies including message

protocols and services

15www.psqtconference.com

Page 16: No Devops Without Continuous Testing

Enabling Technologies

• Stubs

• Service Virtualization

• API testing

• Test data management

• Environment management

• Self-service test environments

16www.psqtconference.com

Page 17: No Devops Without Continuous Testing

How to do it better ?

• Give absolute priority to automated tests

• Invest time into designing interfaces (API)

• Use API (service) testing tools to cover

interfaces

• Measure the quality of the test

Page 18: No Devops Without Continuous Testing

How to do it better ?

• Use stubs and mocks to improve:

– Facilitate test automation

– Increase code penetration

Page 19: No Devops Without Continuous Testing

How to do it better ?

• Use service virtualization to improve

testing automation

– Isolate at the message layer

– Simulate functional scenarios and

performance conditions

Page 20: No Devops Without Continuous Testing

How to do it better?

Test management

•Environments

•Data

•Dependencies

20www.psqtconference.com

Page 21: No Devops Without Continuous Testing

• The Challenge

– Performance issues found late in the SDLC resulting in large rework

and cost

– Middleware component able to handle large load but available

downstream dependent systems were unable to provide throughput

needed

Reduced testing time by 27-days for a major

commercial bank

Capacity Constrained staged environments

Database

Service

Mainframe

Application

1000 tps

Page 22: No Devops Without Continuous Testing

Database

Servic

e

Mainfram

e

Applicatio

n

Reduced testing time by 27-days for a major

commercial bank

1000 tps

Virtual

Asset

Virtual

Asset

Virtual

Asset

Virtual

Asset

• The Solution

– Identified key use-cases and emulate the behavior of dependent

systems. Asset performance setup to match production response values

– API and Load testing tools used to validate system under test. Virtual

assets changed to model different scenarios

• The Business Benefit

– Able to predict performances issues and fix before full Perf testing.

– Able to run different scenarios not easily achieved with production

environment (excessive response times).

– Setup for ‘performance test’ reduced to near zero

Page 23: No Devops Without Continuous Testing

– The Challenge

• Multiple teams using the same test database

• Teams not respecting data integrity & others test data records

• Regression tests consistently failing. Takes >1 hour to determine

that it was due to “data changes”.

• “Real problems” were getting lost in the noise

Shared

Databas

e

Eliminated 83% of the configuration time for a major

telecom company

Test data management for complex transactions

Shared

Database

Page 24: No Devops Without Continuous Testing

– The Solution

• Setup Virtual Assets to model the SQL queries and use API

testing tool to manage automated nightly regressions against

both virtual assets and live systems

– The Business Benefit

• Test teams able to focus on ‘real regressions’ and separate out

data integrity issues from functional test failure

Eliminated 83% of the configuration time for a major

telecom company

Virtual

Asset

Virtual

Asset

Virtual

Asset

Page 25: No Devops Without Continuous Testing

Reduced wait time for test team by 60% for a major media

conglomerate

• The Challenge

– Large agile development effort to adopt Service Oriented Architecture

(SOA)

– High risk project but the Test team “stuck waiting for the first build”

– Development of functionality was not easy to coordinate as different

teams had different schedules; not all finished at the same time

Agile/Parallel development limited by system dependencies

Iteration

Iteration

Iteration

Team A

Team B

Team C

Iteration Iteration

Iteration Iteration Iteration

Iteration Iteration

Current

Development/Testing

dependencies

Page 26: No Devops Without Continuous Testing

Reduced wait time for test team by 60% for a

major media conglomerate• The Solution

– Use descriptions of the new services (WSDL, XSD, example JSON

payloads) to build Virtual assets prototyping the new functionality.

– Test team builds tests with against the prototypes with API testing tool

and the independent development tests use the prototypes to perform

early stage Integration Testing

• The Business Benefits

– Met business goals and timelines, were able to test functionality “as

soon as” it was available. Practiced TDD against prototypes to get a

head-start on ‘full system testing’

Iteration

Iteration

Iteration

Team A

Team B

Team C

Iteration Iteration

Iteration Iteration Iteration

Iteration Iteration

✔✖✔

✖✔✖

Page 27: No Devops Without Continuous Testing

Extended testing hours for a stock trading broker

• The Challenge

– Leverages 3rd party (out sourced) system for trade exchanges

– Many teams need access, so time is scheduled into 4 hour time

windows, and could only test during market hours

Capacity Constrained staged environments

Database

Servic

e

Mainfram

e

Applicatio

n

Page 28: No Devops Without Continuous Testing

Extended testing hours for a stock trading broker

• The Solution

– Use Test environment manager tool to setup ‘Test Silos’ where each

team can do 24x7 testing against virtual assets

Database

Mainfram

e

Applicatio

nEnvironmentManager

Page 29: No Devops Without Continuous Testing

Conclusions

Emulates dependencies for the Test Environment

• Reduces complexity for early stage testing

• Increases predictability

On-Demand “Test Anytime, Anywhere”

• Automated Provisioning for different use-cases

• Automated Test Data Management/Simulation

Reduce time to configure for test

Realistic reusable assets

Reduce hardware costs and system access fees

Page 30: No Devops Without Continuous Testing

Q&A

• Web– http://www.parasoft.com

• Blog– http://alm.parasoft.com

– http://codecurmudgeon.com

•Social

–Facebook: https://www.facebook.com/parasoftcorporation

–Twitter: @Parasoft @CodeCurmudgeon

–LinkedIn: http://www.linkedin.com/company/parasoft