11 The importance of testing Testing means:In architecture:The building where I live is not going to fall downIn aeronautics:The plane where I’m traveling is not going to fall downIn food industries:The food you are having is not going to cause you painHave I convinced you yet?
12 The difficulty of testing Other tested subjects know their ‘environment’
13 The difficulty of testing (II) In Software Engineering we may have:Code run in different serversRace conditionsPerformance issuesCode is integrated with 3rd parties3rd parties changed3rd parties might not be availableRequirements change after placed in production…
14 The difficulty of testing (III) It was never easy to properly testDon’t waste your time testing!We need to get moreprofit from the project
17 Scenario Lots of features Long duration project Several components: APIBehavioursOut-of-the-box customizationsHuge permission complexity3rd party integrationsEtc
18 Coding does not end within the code The ZAIZI Testing EcosystemCoding does not end within the code
19 The ZAIZI Testing Ecosystem Analogía con algo? Medio ambiente, edificio?
20 The ZAIZI Testing Ecosystem Perform unit tests for each piece of codeMock 3rd parties or subsystemsCreate reports for code covering and code healthCreate harnesses for APIsMimic user operations for functional testsCreate report for multiuser and multithread testingAnd more…
21 The ZAIZI Testing Ecosystem : Maven The foundationsFull lifecycle managementDeliver Alfresco code in any formatWar, AMP, Jar, RPMIntegrate some useful pluginsSurefireCoberturaSonar
22 The ZAIZI Testing Ecosystem : jUnit Unit testsMaven surefire integrationVirtual Alfresco contextClean run every timeDatabase wipingDoes not generate the package if some test fails
23 The ZAIZI Testing Ecosystem : Mockito Mimic components, 3rd partiesVery useful to isolate your codeJust test what’s yours
24 The ZAIZI Testing Ecosystem : Sonar Open Source code quality platformWe used for:Check how complex the code isCyclomatic complexityCheck the style of the codeVariable/Methods namesCode coverageAn alternative for cobertura
25 The ZAIZI Testing Ecosystem : Cobertura (II) Line coverage acceptableBranch covering not enough
26 The ZAIZI Testing Ecosystem :JMeter Central axisRunning services automaticallyHTTP: WebscriptsSMTP: sEtcUsed for creating test suites:API harnessesEmulate usersMassive requests
27 The ZAIZI Testing Ecosystem : JMeter (III) Test harness purposes:Catalog of operationsPractical examplesInputs, outputsCheck unexpected changes visually
29 The ZAIZI Testing Ecosystem : JMeter (IV) Functional test purposesCollecting use casesEmulating themChecking the response is the one expected
30 The ZAIZI Testing Ecosystem : JMeter (V) Performance test purposesBasic operations executed several timesSeveral threads, several usersReports for diagnosisCombined with Appdynamics
31 The ZAIZI Testing Ecosystem : Confluence Used for uploading reports
32 The ZAIZI Testing Ecosystem : Confluence Checks every single jMeter operation
33 The ZAIZI Testing Ecosystem : AppDynamics Used for checking and montoring the performance of the applications in the environmentsDetect slow transactions, memory leaks, etcHuge amount of options and configurationsCould be talking about it for hours
35 Automated Continous Testing Testing without human involvementDedicated server for testing purposeContinous deployment purposeConfigurations close to productionRepeatable, robust, auditableAgain, thanks to the customer!!
44 TDD in AlfrescoPossible thanks to Alfresco and Maven-Surefire integrationVirtual Database and Alfresco context
45 TDD in Alfresco Benefits Inconvenients You focus on delivering, not coding for codingCoding behaviors, not just codeTests are really part of documentationDebug actual code from testsUsually less number of defectsInconvenientsTests are slow – Alfresco context starting upNot prepared to test UI
46 Cost Savings Time saving Moral savings Cost effective testing Validation could take more than 3 hoursCreate, check, delete…Project duration might be 2+ yearsDo you need a calculator?Reducing development cycleMoral savingsTesting the same everyday is frustratingYou don’t test the very same twiceCost effective testingYou only test when something went wrong