change impact analysisand change-based testing for...

21
© Vector Software Michal Jablonski 3/5/2017 Change impact analysis and change-based testing for embedded software

Upload: others

Post on 23-May-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

MichalJablonski3/5/2017

Changeimpactanalysis andchange-basedtestingforembeddedsoftware

Page 2: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

AboutVectorSoftware

Page 3: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

Organizationsworld-wideuseourtestautomationplatformtoreducethedevelopmenttime,risk,andcostofdeliveringreliable,secure,andcompliantsoftware.

VectorSoftwareMission

Page 4: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

Whatdevelopmentchallengesdoesyourorganizationface?

§ Timepressurestoreleasenewproducts/upgradestomarket§ Resistancetochangeinestablisheddevelopmentprocesses§ Prioritizingfeatures/developmentinitiatives§ Lackofinformationsharingwithinthedevelopmentorganization§ Lackofbudget

25% 27% 34% 35%

72%

0% 20% 40% 60% 80% 100%

Budget

Information flow

Proritizing

Resistance to change

Time pressure

Source:2016SoftwareTestingTechnologyReport(VectorSoftware,224responders)

Page 5: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

Whatisthemostpressingsoftwaredevelopmentconcernyourorganizationiscurrentlyfacing?

39% 27%

18% 10%

6%

0% 10% 20% 30% 40% 50%

SoftwareQuality

TimetoMarket

Cost

TechnicalDebt

Security

Whatisthemostpressingsoftwaredevelopmentconcernyourorganizationiscurrentlyfacing?

Source:2016SoftwareTestingTechnologyReport(Vector Software,224responders)

Page 6: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

CanweallowsamenumberofdefectsperSLOC?

§ „Developingsoftwareforembeddedsystemsisnotgettinganyeasierorlessexpensive.Sincesystemsoffermorefunctions,codesizegrows…checkingthatcodebecomesachallenge.”

Gartner(HypeCycleforEmbeddedSoftwareandSystems)

§ Does#bugsgrowwith#SLOCs?

§ Someotherexamples:• 787Dreamliner– 7MSLOC• AirbusA380– 100MSLOC• FordF150– 150MSLOC

Page 7: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

HowtoimproveSoftwareQuality§ CantestingimproveSoftwareQuality?

• Testingdoesnotimprovequalitydirectly• Testingcansetthebenchmarkforyourstateofquality

§ Testing togetherwithgoodmetrics,KPIs andqualitygatescanpreventbugslippage

RequirementsSpecification

Architecture

SystemDesign

Coding

SystemTesting

IntegrationTesting

UnitTesting

Page 8: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

Choice:qualityortimetomarket?

Page 9: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

Howcanchangebasetestinghelpus?

Page 10: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

Howoftentest software?

§ Assoonandasoftenaspossible!

§ Findanybuginearlystage=reducethecostoffixingthebug

§ Howoftenisoftenandcanwedoitevenmoreoften?

*DevOps:Shiftleftwithcontinuoustestingbyusingautomationandvirtualization(IBM;Dibbe Edwards)**HowGoogleTestsSoftware(JamesA.Whittaker,JasonArbon,andJeffCarollo)

TestingPhase ~Cost/Bug**

System Test $5000

IntegrationTest $500

FullBuild $50

UnitTest $5

PhaseoftheS/W Dev Relativecost tofixabug*

Maintenance 100x

Testing 15x

Implementation 6.5x

Design 1

Page 11: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

HowVectorCAST testsVectorCAST?

§ Manydifferenttestcampaigns• UnitTesting• IntegrationTesting• SystemTesting• RequirementTesting• ...

§ ThreedifferentOSsupported• Windows,Linux,Solaris

§ 300+compliersconfigurationsupported• IAR,Keil,CodeComposer,Renesas,VisualStudio,....• Runningonhost,simulatorandtargets

§ Resultinginover36Ktestcases.

Page 12: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

Software- ChangeProcess§ Softwaredeveloperchangescode

• Bugfixes• Newfeatures• Requirementchanged

§ CodeChangesneedtobetested• Unit,integration,system– testing

§ Executionofalltestcasesinallconfigurationsisimpossible• Codechangeissystemtestedinoneconfiguration• Maybeunittestedinoneconfiguration

§ DuetoruntimeIntegrationtestsareexecutedonlyonceperweekormonth• IssuesfoundinintegrationtestingneedtobetracedbacktotheresponsibleSWdeveloper• ResponsibleSWdeveloperneedstounderstandtheproblemandfixthebug

§ Ifnotallconfigurationsaretestedornointegrationtestisestablishedthecustomerwillfindthebugafterproductrelease

Page 13: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

Whatischangebasedtesting?

§ Executetestcasesbasedonsourcecodechanges• Thetestmanagementsystemneedstobeawarewhichcodechanged

• Thiscanbearchieved e.g.usingatimestamporachecksum• Testcaseneedstobeassociatedwithsourcelineofcode

• Thiscanbearchieved e.g.usingcodecoverageanalysis

§ Onlyre-buildtestenvironmentswherethesourcecodechanged• Manyunit-,orintegration– testenvironmentsarenotaffectedbythecodechange

§ Onlyexecutetestcasesthatareaffectedbythecodechanges• Eveninsideonefileonlysomefunctionshavechanged• Inmostcasesyoudon‘thavetoexecutealltestcasesonthatfile

§ Requirementchanged• Failallthetestcaseslinkedwiththechangedrequirement• Requiretheuserto„visit”affectedtestcases.

Page 14: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

ChangeBaseTestingsimulation

Sourcecodechange

Page 15: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

WhatTestEnvironmentsneedtoberebuilt?

UnitTestsEnvironments

IntegrationTestEnvironments

SystemTestEnvironmentsSourcecode

Files(.c,.cpp,.h)

Page 16: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

WhatTestCasesneedtobeexecuted

UnitTestEnvironments

Integration TestEnvironments

SystemTestEnvironmentsSourcecode

Files(.c,.cpp,.h)

Page 17: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

WhatTestCasesneedtobeexecuted

UnitTestEnvironments

Integration TestEnvironments

SystemTestEnvironmentsSourcecode

Files(.c,.cpp,.h)

Page 18: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

RegressionTestinginallVariants...

§ ...isnowpossible§ Reducednumberofenvironmentsthathavetobebuilt

§ Reducednumberoftestcases

§ Changebasedtestselectionhastobedoneineachconfiguration

Sourcecode

Files(.c,.cpp,.h)

Page 19: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

ChangeBasedTestingbenefits

§ Reducedtestexecutiontime§ Allowsthedevelopertoexecuteall!(necessary)testcasesbefore

check-in§ Nointegrationtesterrorsthatshowupafterweeks§ Improvementofinfrastructureutilization§ Improvementoftimetomarket§ Qualityimprovements

Time

Cost

Page 20: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

QuestionsandAnswers

!?

Page 21: Change impact analysisand change-based testing for ...etn.fi/images/a/17/5/VectorCast-Change-impact... · * DevOps: Shift left with continuous testing by using automation and virtualization

©VectorSoftware

ConnectWithUs

Americas Europe, MiddleEast,andAfrica Asia-PacificandRussia1351SouthCountyTrailEastGreenwich,RI02818UnitedStatesofAmerica

8DuncannonStreetLondonWC2N4JFUnitedKingdom

St.Töniser Str.2a47906KempenGermany

222-0033WiseNext3F2-5-14Shin-Yokohama,Kouhoku-kuYokohama,Kanagawa,Japan

[email protected]+14013987185

[email protected]+442036030120

[email protected]+4921528088808

[email protected]:+861084184600India:+918026583300Japan:+81452859387Singapore:+6531582718