1 / 50

Testing Tools in Alfresco

Testing Tools in Alfresco. About me Fran Álvarez Zaizi Iberia Director Keywords: ECM, Information retrieval, testing, semantic technologies T witter: @fran7alvarez Email: falvarez@zaizi.com Skype: fjalvarezb.

dermot
Download Presentation

Testing Tools in Alfresco

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Testing Tools in Alfresco

  2. About me • Fran Álvarez • Zaizi Iberia Director • Keywords: ECM, Information retrieval, testing, semantic technologies Twitter: @fran7alvarez Email: falvarez@zaizi.com Skype: fjalvarezb

  3. WARNINGThis presentation may contain technical contentManager discretion is advised

  4. Index • Testing concept • Zaizi testing stack • Challenges • Ecosystem • Continous Testing • Advice • Evolution • TDD in Alfresco • Conclusions

  5. What is ‘Test’ A test is an assessment intended to measure a test-taker’sknowledge, skill, aptitude, physical fitness or classification in many other topics.

  6. Test in Software Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test.

  7. Our measurement (aka Metrics) • How well our code works • How ‘well coded’ our code is • How good our tests are • How well the requirements are met • How well our features responds to massively requests

  8. Our assessment • Different ways to measure: • Border Line • 100%-0% • Acceptance criteria definition • Example: • 100% UT, 95% FT, 70% CC

  9. Our test-taker…

  10. …knowledge

  11. The importance of testing • Testing means: • In architecture: • The building where I live is not going to fall down • In aeronautics: • The plane where I’m traveling is not going to fall down • In food industries: • The food you are having is not going to cause you pain Have 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 servers • Race conditions • Performance issues • Code is integrated with 3rd parties • 3rd parties changed • 3rd parties might not be available • Requirements change after placed in production …

  14. Thedifficulty of testing (III) • Itwasnevereasytoproperly test Don’t waste your time testing! We need to get more profit from the project

  15. Scenario

  16. Scenario • Lots of features • Long durationproject • Severalcomponents: • API • Behaviours • Out-of-the-box customizations • Hugepermissioncomplexity • 3rd partyintegrations • Etc

  17. The ZAIZI TestingEcosystem Codingdoesnotendwithinthecode

  18. The ZAIZI TestingEcosystem

  19. The ZAIZI Testing Ecosystem • Perform unit tests for each piece of code • Mock 3rd parties or subsystems • Create reports for code covering and code health • Create harnesses for APIs • Mimic user operations for functional tests • Create report for multiuser and multithread testing • And more…

  20. The ZAIZI TestingEcosystem : Maven • Thefoundations • Full lifecyclemanagement • DeliverAlfrescocode in anyformat • War, AMP, Jar, RPM • Integratesomeusefulplugins • Surefire • Cobertura • Sonar

  21. The ZAIZI TestingEcosystem : jUnit • Unittests • Mavensurefireintegration • Virtual Alfrescocontext • Cleanrunevery time • Databasewiping • Doesnotgeneratethepackageifsome test fails

  22. The ZAIZI Testing Ecosystem : Mockito • Mimic components, 3rd parties • Very useful to isolate your code • Just test what’s yours

  23. The ZAIZI TestingEcosystem : Sonar • Open Sourcecodequalityplatform • Weusedfor: • Checkhowcomplexthecodeis • Cyclomaticcomplexity • Checkthestyle of thecode • Variable/Methodsnames • Codecoverage • Analternativefor cobertura

  24. The ZAIZI TestingEcosystem : Cobertura (II) • Line coverageacceptable • Branchcoveringnotenough

  25. The ZAIZI TestingEcosystem :JMeter • Central axis • Runningservicesautomatically • HTTP: Webscripts • SMTP: Emails • Etc • Usedforcreating test suites: • API harnesses • Emulateusers • Massiverequests

  26. The ZAIZI TestingEcosystem : JMeter (III) • Test harnesspurposes: • Catalog of operations • Practicalexamples • Inputs, outputs • Checkunexpectedchangesvisually

  27. DEMO

  28. The ZAIZI TestingEcosystem : JMeter (IV) • Functional test purposes • Collecting use cases • Emulatingthem • Checkingthe response istheoneexpected

  29. The ZAIZI TestingEcosystem : JMeter (V) • Performance test purposes • Basic operationsexecutedseveral times • Severalthreads, severalusers • Reportsfor diagnosis • CombinedwithAppdynamics

  30. The ZAIZI TestingEcosystem : Confluence • Usedforuploadingreports

  31. The ZAIZI TestingEcosystem : Confluence • Checksevery single jMeteroperation

  32. The ZAIZI TestingEcosystem : AppDynamics • Usedforchecking and montoringthe performance of theapplications in theenvironments • Detectslowtransactions, memoryleaks, etc • Hugeamount of options and configurations • Could be talkingaboutitforhours

  33. The ZAIZI TestingEcosystem : AppDynamics

  34. AutomatedContinousTesting • Testingwithout human involvement • Dedicated server fortestingpurpose • Continousdeploymentpurpose • Configurationsclosetoproduction • Repeatable, robust, auditable Again, thankstothecustomer!!

  35. AutomatedContinousTesting • Notanymore!!

  36. AutomatedContinousTesting - Algorithm

  37. Don’t become a test-addict • Don’t ‘all-in’ if you don’t need it • Meet your requirements, do your testing Leverage your code with testing, not the opposite!

  38. Evolutioningtheecosystem • Makingfunctionaltests more functional • Detectingsomebehaviorswithinthe log files

  39. Ecosystem 2.0: Splunk • Monitor Alfresco logs with ‘live’ tests • Detect unexpected outputs • Alert unexpected behaviour “Would you like to know more?”

  40. Ecosystem 2.0: Selenium • Limitationswith JMeter in Share • Asynchronouscalls are notcatchedproperly • Seleniumisperfecttoemulateuser&browserinteraction

  41. TDD in Alfresco • Test DrivenDevelopment • Simple software developmenttechnique • Short developmentcycles • Focusedondeliverwhatisrequired, nothingelse

  42. TDD in Alfresco

  43. TDD in Alfresco • PossiblethankstoAlfresco and Maven-Surefireintegration • Virtual Database and Alfrescocontext

  44. TDD in Alfresco • Benefits • You focus on delivering, not coding for coding • Coding behaviors, not just code • Tests are really part of documentation • Debug actual code from tests • Usually less number of defects • Inconvenients • Tests are slow – Alfresco context starting up • Not prepared to test UI

  45. Cost Savings • Time saving • Validation could take more than 3 hours • Create, check, delete… • Project duration might be 2+ years • Do you need a calculator? • Reducing development cycle • Moral savings • Testing the same everyday is frustrating • You don’t test the very same twice • Cost effective testing • You only test when something went wrong

  46. Conclusions

  47. Conclusions • Testing is a good QA indicator • Not conform yourself with Unit tests • Build a stack to fully test your apps • You will save time and frustations • Don’t become crazy by testing

  48. Credits (or thanks, thanks, thanks) • Trafigura • Michael Phan – Technical Architect • James Bennett – Head of QA • Ian Carr – Project Manager

  49. Thankyou!

More Related