11The 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?
12The difficulty of testing Other tested subjects know their ‘environment’
13The 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…
14The difficulty of testing (III) It was never easy to properly testDon’t waste your time testing!We need to get moreprofit from the project
17Scenario Lots of features Long duration project Several components: APIBehavioursOut-of-the-box customizationsHuge permission complexity3rd party integrationsEtc
18Coding does not end within the code The ZAIZI Testing EcosystemCoding does not end within the code
19The ZAIZI Testing Ecosystem Analogía con algo? Medio ambiente, edificio?
20The 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…
21The ZAIZI Testing Ecosystem : Maven The foundationsFull lifecycle managementDeliver Alfresco code in any formatWar, AMP, Jar, RPMIntegrate some useful pluginsSurefireCoberturaSonar
22The ZAIZI Testing Ecosystem : jUnit Unit testsMaven surefire integrationVirtual Alfresco contextClean run every timeDatabase wipingDoes not generate the package if some test fails
23The ZAIZI Testing Ecosystem : Mockito Mimic components, 3rd partiesVery useful to isolate your codeJust test what’s yours
24The 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
25The ZAIZI Testing Ecosystem : Cobertura (II) Line coverage acceptableBranch covering not enough
26The ZAIZI Testing Ecosystem :JMeter Central axisRunning services automaticallyHTTP: WebscriptsSMTP: sEtcUsed for creating test suites:API harnessesEmulate usersMassive requests
27The ZAIZI Testing Ecosystem : JMeter (III) Test harness purposes:Catalog of operationsPractical examplesInputs, outputsCheck unexpected changes visually
29The ZAIZI Testing Ecosystem : JMeter (IV) Functional test purposesCollecting use casesEmulating themChecking the response is the one expected
30The ZAIZI Testing Ecosystem : JMeter (V) Performance test purposesBasic operations executed several timesSeveral threads, several usersReports for diagnosisCombined with Appdynamics
31The ZAIZI Testing Ecosystem : Confluence Used for uploading reports
32The ZAIZI Testing Ecosystem : Confluence Checks every single jMeter operation
33The 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
35Automated Continous Testing Testing without human involvementDedicated server for testing purposeContinous deployment purposeConfigurations close to productionRepeatable, robust, auditableAgain, thanks to the customer!!
44TDD in AlfrescoPossible thanks to Alfresco and Maven-Surefire integrationVirtual Database and Alfresco context
45TDD 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
46Cost 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