software testing video€¦ · 3. end-user documentation (the people that shall actually use the...

56
Software Testing Hans-Petter Halvorsen, M.Sc.

Upload: others

Post on 25-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

SoftwareTesting

Hans-PetterHalvorsen,M.Sc.

Page 2: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

RequirementsAnalysis

Design

Implementation

Testing

Maintenance

PlanningDeployment

SRS

SDD

STD

Code

InstallationGuides

UserGuides

GanttChart

withERDiagram,UMLDiagrams,CADDrawings

TestDocumentation

SoftwareRequirementsSpecifications

SoftwareDesignDocumentsSystemDocumentation

SoftwareTestPlan(STP)

ProjectPlanning

End-UserDocumentation

SystemDocumentation

SoftwareTestDocumentation

SDPSoftwareDevelopment

Plan

GanttChart

TheSoftwareDevelopment

Lifecycle(SDLC)

Page 3: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TypicalSoftwareDocumentation

High-LevelRequirementsandDesignDocuments

UserManuals

SystemDocumentation

InstallationGuides

TestPlans

TestDocumentation

DetailedRequirementsandDesignDocuments

ERDiagram(Database)UMLDiagrams(Code)

Time

Start

Finish

HowtoTest/WhattoTest

CADDrawings,etc.

1.Planning

2.Testing

3.End-userDocumentation(Thepeoplethatshallactuallyusethesoftware)

TechnicalStuff

HowtouseitHowtoinstallit

Proofthatyouhavetestedandthatthesoftwareworksasexpected

(Thestakeholders,thesoftwareteam;architects,UXdesigners,developers)

(QApeople)

(SuperUser/ITdep.)

WHATHOW

(EndUser)

ProjectM

anagem

ent(Ga

nttC

hart,etc.)

(SRS)(SDD)

(STP)(STD)

SoftwareDevelopmentPlan

(SDP)

2.Requierements/Design

Page 4: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

MainpurposeofTesting:FindBugs!!

• RequirementsErrors:13%• DesignErrors:24%• CodeErrors:38%• DocumentationErrors:13%• Bad-fixErrors:12%

http://proquest.safaribooksonline.com/book/software-engineering-and-development/9781449691998/chapter-3-engineering-of-software/42?uicode=telemark

Page 5: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WhyFindBugsearly?

SoftwareDevelopmentLifeCycle(SDLC)

Page 6: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TheFirstBugever

Theyfoundabug(actuallyamoth)insideacomputerin1947thatmadetheprogramnotbehavingasexpected.Thiswasthe“first”realbug.

Page 7: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WhatisBugs?• Asoftwarebugisanerror,flaw,failure,orfaultinacomputerprogramorsystemthatproducesanincorrectorunexpectedresult,orcausesittobehaveinunintendedways

• Theyfoundabug(actuallyamoth)insideacomputerin1947thatmadetheprogramnotbehavingasexpected.Thiswasthe“first”realbug.

• Debugging:FindandRemove/FixBugs

Page 8: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

“Ifyoudon’tknowhowyourcodeworks,itdoesnotwork– youjustdon’tknowityet”

SoftwareTesting

“50%ofthesoftwaredevelopmentisabouttestingyoursoftware”

Page 9: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

DifferentSystemsNeedsDifferentTesting1 2

3 4

Page 10: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

7PrinciplesofTesting1. TestingshowsthepresenceofBugs:SoftwareTestingreducestheprobabilityof

undiscovereddefectsremaininginthesoftwarebutevenifnodefectsarefound,itisnotaproofofcorrectness.

2. ExhaustiveTestingisimpossible:Testingeverythingisimpossible!Insteadweneedoptimalamountoftestingbasedontheriskassessmentoftheapplication.

3. EarlyTesting:TestingshouldstartasearlyaspossibleintheSoftwareDevelopmentLifeCycle(SDLC)

4. DefectClustering:Asmallnumberofmodulescontainmostofthedefects/bugsdetected.

5. ThePesticideParadox:Ifthesametestsarerepeatedoverandoveragain,eventuallythesametestcaseswillnolongerfindnewbugs

6. TestingisContextdependent:Thismeansthatthewayyoutestae-commercesitewillbedifferentfromthewayyoutestacommercialofftheshelfapplication

7. AbsenceofErrorisaFallacy:Findingandfixingdefectsdoesnothelpifthesystembuildisunusableanddoesnotfulfilltheusersneeds&requirements

http://www.guru99.com/software-testing-seven-principles.htmlhttp://www.testingexcellence.com/seven-principles-of-software-testing

Page 11: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

DifferentTypesofTesting

Hans-PetterHalvorsen,M.Sc.

Page 12: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TypesofTesting

StressTesting

UsabilityTesting

PerformanceTesting

UserTesting

RegressionTesting

Setyp&DeploymentTesting

...

......

RequirementsTesting

GUITesting

FunctionalTesting

NonFunctionalTesting ...

...

...LoadTesting

UsabilityTesting

SecurityTesting

Page 13: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WhodoestheTesting?• Programmers/Developers

– Programmersusuallycreatetestcasesandrunthemastheywritethecodetoconvincethemselvesthattheprogramworks.Thisprogrammeractivityrelatedtotestingisusuallyconsideredtobeunittesting.

• Testers– Atesterisatechnicalpersonwhoserolefortheparticularitembeingtestedisjusttowritetest

casesandensuretheirexecution.Althoughprogrammingknowledgeisextremelyusefulfortesters,testingisadifferentactivitywithdifferentintellectualrequirements.Notallgoodprogrammerswillbegoodtesters.

• EndUsers/Customers– Itisagoodideatoinvolveusersintesting,inordertodetectusabilityproblemsand

toexposethesoftwaretoabroadrangeofinputsinreal-worldscenarios.

Page 14: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TestCategoriesBlack-boxvs.White-boxTesting

White-boxTesting:Youneedtohaveknowledgeofhow(DesignandImplementation)thesystemisbuilt

Black-boxTesting:Youneednoknowledgeofhowthesystemiscreated.

TypicallydonebyDevelopers,etc

Page 15: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

LevelsofTesting

UnitTesting

IntegrationTesting

SystemTesting

AcceptanceTesting

Anymodule,program,objectseparatelytestable

Interfacebetweencomponents;interactionswithothersystems(OS,HW,etc)

Thebehaviorofthewholeproduct(system)asdefinedbythescopeoftheproject

Istheresponsibilityofthecustomer– ingeneral.Thegoalistogainconfidenceinthesystem;especiallyinitsnon-functionalcharacteristics

Page 16: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

LevelsofTestingUnitTesting:Testeachpartsindependentlyandisolated

IntegrationTesting:Makesurethatdifferentpiecesworktogether.TesttheInterfacesbetweenthedifferentpieces.Interactionwithothersystems(Hardware,OS,etc.)

SystemTesting:Testthewholesystem

RegressionTesting:Testthatitstillworksafterachangeinthecode

Page 17: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

LevelsofTesting

UnitTesting

RegressionTesting

IntegrationTesting

System/ValidationTesting

AcceptanceTesting

Start

Finish

Requirements&DesignStartDevelopment

UnitTestsarewrittenbytheDevelopersaspartoftheProgramming.EachpartisdevelopedandUnittestedseparately(EveryClassandMethodinthecode)

TheCustomerneedstotestandapprovethesoftwarebeforehecantakeitintouse.FAT/SAT.

SystemtestingistypicallyBlack-boxTeststhatvalidatetheentiresystemagainstitsrequirements,i.eCheckingthatasoftwaresystemmeetsthespecifications

Integrationtestingmeansthesystemisputtogetherandtestedtomakesureeverythingworkstogether.

Regressiontestingistestingthesystemtocheckthatchangeshavenot“broken”previouslyworkingcode.BothManually&Automatically(Re-runUnitTests)

Page 18: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TestingOverviewTestCategories: TestLevels: TestMethods:

UnitTesting

RegressionTesting

IntegrationTesting

SystemTesting

AcceptanceTesting

Black-boxTesting

White-boxTesting

StressTesting

PerformanceTesting

GUITesting

FunctionalTesting

NonFunctionalTesting

LoadTesting

UsabilityTesting

SecurityTesting

etc.

Page 19: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

SoftwareTestPlan(STP)

Hans-PetterHalvorsen,M.Sc.

Page 20: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TestPlanning• Tomaximizetheeffectivenessofresourcesspentontesting,asystematicapproachisrequired

• ASoftwareTestPlan(STP)shouldbecreated

Page 21: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TestDocumentation

21

PlanningTests PerformTests DocumentTestResults

SoftwareTestPlan(STP)

SoftwareRequirementsSpecifications(SRS)SoftwareDesignDocument(SDD)

SoftwareTestDocumentation

(STD)

TestLogs

ThesedocumentswillbethefoundationforallTesting

- Functional&Non-FunctionalRequirements- User&SystemRequirements

Page 22: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TypicalSoftwareDocumentation

High-LevelRequirementsandDesignDocuments

UserManuals

SystemDocumentation

InstallationGuides

TestPlans

TestDocumentation

DetailedRequirementsandDesignDocuments

ERDiagram(Database)UMLDiagrams(Code)

Time

Start

Finish

HowtoTest/WhattoTest

CADDrawings,etc.

1.Planning

2.Testing

3.End-userDocumentation(Thepeoplethatshallactuallyusethesoftware)

TechnicalStuff

Howtouseit

Howtoinstallit

Proofthatyouhavetestedandthatthesoftwareworksasexpected

(Thestakeholders,thesoftwareteam;architects,UXdesigners,developers)

(QApeople)

(SuperUser/ITdep.)

WHATHOW

(EndUser)ProjectM

anagem

ent(Ga

nttC

hart,etc.)

(SRS)(SDD)

(STP)(STD)

SoftwareDevelopmentPlan (SDP)

2.Requierements/Design

Page 23: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WhatisaSoftwareTestPlan(STP)?ADocumentthatanswersthefollowing:• TestingshouldbebasedonRequirements&DesignDocuments• Whatshallwetest?• Howshallwetest?• Hardware/SoftwareRequirements• Whereshallwetest?• Whoshalltest?• Howoftenshallwetest(TestSchedule)?• Howshalltestsbedocumented?

§ Itisnotenoughsimplytoruntests;theresultsofthetestsmustbesystematicallyrecorded.Itmustbepossibletoauditthetestingprocesstocheckthatithasbeencarriedoutcorrectly

§ Systemtests:Thissection,whichmaybecompletelyseparatefromthetestplan,definesthetestcasesthatshouldbeappliedtothesystem.Thesetestsarederivedfromthesystemrequirementsspecification. http://www.softwareengineering-9.com/Web/Testing/Planning.html

Page 24: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

ThesethingsneedtobespecifiedintheSTP

Page 25: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TestPlanExampleA. GoalsandExitCriteria(Quality,Robustness,Schedule,PerformanceGoals

oftheProduct,...)B. ItemstobeTested/Inspected(Executablessuchasmodulesand

components,NonexecutablessuchasRequirmentsandDesignspecifications,...)

C. TestProcess/Methodologies(Unit,Functional,Acceptance,RegressionTests,Black-box,White-box,Testmetrics,Bugreportprocess,...)

D. Resources(People,Tools,TestEnvironment,...)E. Schedule(Test-casedevelopment,Testexecution,Problemreportingand

fixing,...)F. Risks(...)G. MajorTestScenariosandTestCases(...)

EssentialsofSoftwareEngineering,FrankTsui;OrlandoKaram;BarbaraBernal,3ed.,Jones&BartlettLearning

AppendixDinEssentialsofSoftwareEngineering

Page 26: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

HowtomakeaTestPlan

http://www.guru99.com/what-everybody-ought-to-know-about-test-planing.html

Page 27: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TestCasesListExampleTester:_______________________,Date:________

TestCase OK Failed Description

TheLoginProcedureworks

UserDataSavedintheDatabase

etc

TheTestersfillintheseListselectronically.ShouldbeincludedinSoftwareTestDocumentation

IfTestCasesFails,reportBugsinVSO

Page 28: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TestPlanningSummary• Testplanninginvolvesschedulingandestimatingthesystemtestingprocess,

establishingprocessstandardsanddescribingtheteststhatshouldbecarriedout.• Aswellashelpingmanagersallocateresourcesandestimatetestingschedules,test

plansareintendedforsoftwareengineersinvolvedindesigningandcarryingoutsystemtests.

• Theyhelptechnicalstaffgetanoverallpictureofthesystemtestsandplacetheirownworkinthiscontext.

• Aswellassettingoutthetestingscheduleandprocedures,thetestplandefinesthehardwareandsoftwareresourcesthatarerequired.

• Testplansarenotastaticdocumentsbutevolveduringthedevelopmentprocess.Testplanschangebecauseofdelaysatotherstagesinthedevelopmentprocess.

• Testplanningisparticularlyimportantinlargesoftwaresystemdevelopment.• Forsmallandmedium-sizedsystems,alessformaltestplanmaybeused,butthereis

stillaneedforaformaldocumenttosupporttheplanningofthetestingprocess.http://www.softwareengineering-9.com/Web/Testing/Planning.html

Page 29: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

TestEnvironment

Hans-PetterHalvorsen,M.Sc.

Page 30: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WhyDoWeNeedaTestEnvironment?

WhycantwejustuseourownPC?

Page 31: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WhyTestEnvironment?• “ItworksonmyPC”saystheDeveloper• CleanEnvironment• OntheDevelopersPCswehaveallkindofSoftwareinstalledthat

theCustomerdonthave,e.g.DevelopmentToolslikeVisualStudio,etc.

• WeneedtotestondifferentPlatformsandOperatingSystems• CustomersmayusedifferentWebBrowsers• Deployment:TestofInstallationpackages• MakethesoftwareavailableforTesters• etc.

Page 32: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

“ItworksonmyComputer”MakesuretotestyoursoftwareonotherComputersandEnvironmentsthanyourDevelopmentComputer!• EverythingworksontheDeveloperComputer• TheCustomersDatabaseisnotthesameasyours• TheCustomermaynotusethesameOS• TheCustomermaynotusethesameWebBrowser• TheCustomerdonothaveVisualStudio,SQLServer,etc.ontheirPersonalComputer

• Etc.=>TestEnvironmentisneeded!

Page 33: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

Development Testing Production

DevelopmentEnvironment TestEnvironment

ProductionEnvironment

TypicallytheDevelopersPersonalComputerwithDatabase,WebServerandProgrammingSoftware

ACleanPC/Server(oranetworkwithPCsandServers)whereyouinstallandtestyourSoftware.Todaywetypicallyset-upaVirtualTestEnvironment

TheCustomersenvironmentwhereyouunstallthefinalsoftware(ServersandClients)

ProgrammingenvironmentssuchasVisualStudio,etc.shouldnotbeinstalledinthisenvironment.Youneedtocreate.exefilesetc.inordertomakeyoursoftwarerun.

Developers Developers&Testers Customersuntilfinished

Page 34: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

Virtualization

OperationSystem

VirtualizationSoftware

Hypervisor

VM VM VM

Hardware(Computer)

VM VM VM

Guests

Host

VM=VirtualMachines

AHypervisorcanrundirectlyonthecomputerwithoutaHostOS

Windows,Linux,...

Windows,Linux,...

Page 35: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

VirtualizationSoftwareAlotofVirtualizationSoftwareexists.Herearesomeexamples:• VMwareWorkstation• VMwareWorkstationPlayer (Freeofchargeandsimpleto

use)• VMwarevSphereandvSphereHypervisor• VMwareFusion(Mac)• ParallelsDesktop(Mac)• MicrosoftHyper-V• VirtualBox• etc.

Page 36: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

VMwareWorkstationPlayerVMwareWorkstationPlayerisforpersonaluseonyourownPC.VMwarePlayerisfreeofchargeforpersonalnoncommercialuse.

36

VMwareisacompanythathasbeenspecializingwithinvirtualizationsoftware.http://www.vmware.com

Page 37: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WhenareyoufinishedTesting?

Hans-PetterHalvorsen,M.Sc.

Page 38: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

SoftwareTesting

“50%ofthesoftwaredevelopmentisabouttestingyoursoftware”

WhenarewefinishedwithTesting?

Page 39: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

Start

Finished

Requirements&Design

Development&Coding

ContinuousTestinginthewholeSDLC!

Alph

a

RCBeta

RTM

FinalDelivery

Testing

Testing Testing Testing Testing

IncreasedFocus

IncreasedFocus

IncreasedFocus

IncreasedFocus

Agile/Scrum:PeriodicallyIterations/Sprintevery14-30days

...... ...

CodeFreeze

SoftwarewithoutCritical Bugs

Requirements&Functionality

FunctionalityRequirements

YoucanneverfindallBugs!ReleasedSoftwaredo haveBugs!

Page 40: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WhentoStopTesting?

• Asimpleansweristostoptestingwhenalltheplannedtestcasesareexecutedandalltheproblemsfoundarefixed.

• Inreality,itmaynotbethatsimple.Weareoftenpressuredbyscheduletoreleasesoftwareproduct.

Page 41: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

SoftwareFinished

Time

WhentoStopDevelopment?

“90%”“100%”

Details,smalladjustments,etc.Thelast10%takesalotoftime!!!

Soonerorlateryouhavetosayenoughisenoughandreleaseversion1.0.

Onemustdefinewithinthedevelopmentcompany,developmentteamorindialoguewiththecustomerwhatisdefinedas"goodenough".Softwarewillneverbe100%completeorerror-free!

Page 42: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

Time

WhentoStopTesting?

CriticalPoint

Inthebeginningititeasytofindbugswithfewresources

WhenshouldyoustopTesting?(dependsonTime,Budget,etc.)

Page 43: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WhentoStopTesting?• Whenthetesterhasnotbeenabletofindanotherdefectin5(10?30?100?)minutesoftesting

• Allcodereviewsandwalkthroughshavecertifiedthecodeasok

• Whenagivenchecklistoftesttypeshasbeencompleted

• Thecodehaspassedallunittests• Whentestingrunsoutofitsscheduledtime• ...

E.J.BraudeandM.E.Bernstein,SoftwareEngineering:ModernApproaches,2ed.:Wiley,2011.+++

Page 44: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

BugTrackingSystems

Hans-PetterHalvorsen,M.Sc.

Page 45: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

BugTrackingSystems• A“bugtrackingsystem”or“defecttrackingsystem”isasoftwareapplicationthatkeepstrackofreportedsoftwarebugsinsoftwaredevelopmentprojects.

• Itmayberegardedasatypeof“issuetrackingsystem”.

• Typicallybugtrackingsystemsareintegratedwithothersoftware“projectmanagementapplications”– e.g.,VisualstudioTeamServices,Jira,etc.

https://en.wikipedia.org/wiki/Bug_tracking_system

Page 46: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

BugTrackingSoftware• TeamFoundationServer/VisualStudioTeamServices

• Jira• Bugzilla• Clearquest• …(hundreds)

Page 47: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

BugReportingandTracking

BugTrackingSystem

Developer

Tester

ReportBugs

FixBugs

CheckifBugsareFixed

CheckifBugFixesareApproved

TestManager,ProjectManager,QADepartment

AssignResponsible

Person

GothroughListsofNotFixedBugs,FixedBugs,etc.

Page 48: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

VisualStudioTeamServices

Hans-PetterHalvorsen,M.Sc.

Page 49: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WorkItemsExample

YoucancreateQueries(bothPersonalandTeamQueries)

ListofWorkItems

WorkItemDetails

Page 50: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WorkItems– NewBug

Page 51: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

Queries• UsedtofindexistingWorkItems• YoumaycreatedifferentQueriestomakeiteasytofindtheWorkItemsyouneed

• Queriesmaybepersonalorvisibleforeverybodyintheproject(TeamQueries)

51

Page 52: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

CreatingaQuery- Example

Page 53: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

CodeReview&Refactoring

Hans-PetterHalvorsen,M.Sc.

Page 54: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

WhatisRefactoring?• Evenwhenusingbestpracticesandmakingaconsciousefforttoproducehigh-qualitysoftware,itishighlyunlikelythatyouwillconsistentlyproduceprogramsthatcannotbeimproved.

• Refactoringis– theactivityofimprovingyourcodestylewithoutalteringitsbehavior

– achangemadetotheinternalstructureofsoftwaretomakeiteasiertounderstandandcheapertomodifywithoutchangingitsobservablebehavior

Page 55: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

Refactoring- Symptoms• CodingStyleandNameConventionsnotfollowed• ProperCommentingnotfollowed• Duplicatedcode(clearlyawaste).• Longmethod(excessivelylargeorlongmethodsperhapsshouldbesubdivided

intomorecohesiveones).• Largeclass(sameproblemaslongmethod).• Switchstatements(inobject-orientedcode,switchstatementscaninmost

casesbereplacedwithpolymorphism,makingthecodeclearer).• Featureenvy,inwhichamethodtendstousemoreofanobjectfromaclass

differenttotheoneitbelongs.• Inappropriateintimacy,inwhichaclassreferstoomuchtoprivatepartsof

otherclasses.=> Anyofthesesymptoms(andmore)willindicatethatyourcodecanbeimproved.Youcanuserefactoringtohelpyoudealwiththeseproblems.

Page 56: Software Testing Video€¦ · 3. End-user Documentation (The people that shall actually use the software) Technical Stuff How to use it How to install it Proof that you have tested

Hans-PetterHalvorsen,M.Sc.

UniversityCollegeofSoutheastNorwaywww.usn.no

E-mail:[email protected]:http://home.hit.no/~hansha/