testing tools in alfresco
DESCRIPTION
Testing Tools in Alfresco. About me Fran Álvarez Zaizi Iberia Director Keywords: ECM, Information retrieval, testing, semantic technologies T witter: @fran7alvarez Email: [email protected] Skype: fjalvarezb. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/1.jpg)
Testing Tools in Alfresco
![Page 2: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/2.jpg)
About me
• Fran Álvarez• Zaizi Iberia Director• Keywords: ECM, Information retrieval, testing, semantic
technologies
Twitter: @fran7alvarezEmail: [email protected]: fjalvarezb
![Page 3: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/3.jpg)
WARNINGThis presentation may contain technical content
Manager discretion is advised
![Page 4: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/4.jpg)
Index
• Testing concept
• Zaizi testing stack
• Challenges
• Ecosystem
• Continous Testing
• Advice
• Evolution
• TDD in Alfresco
• Conclusions
![Page 5: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/5.jpg)
What is ‘Test’
A test is an assessment intended to measure a test-taker’s knowledge, skill, aptitude, physical fitness or classification in many other topics.
![Page 6: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/6.jpg)
Test in Software
Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test.
![Page 7: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/7.jpg)
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
•
![Page 8: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/8.jpg)
Our assessment
•Different ways to measure:• Border Line
• 100%-0%
•Acceptance criteria definition• Example:
• 100% UT, 95% FT, 70% CC
![Page 9: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/9.jpg)
Our test-taker…
![Page 10: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/10.jpg)
…knowledge
![Page 11: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/11.jpg)
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?
![Page 12: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/12.jpg)
The difficulty of testing
• Other tested subjects know their ‘environment’
![Page 13: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/13.jpg)
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
…
![Page 14: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/14.jpg)
The difficulty of testing (III)
• It was never easy to properly test
Don’t waste your time testing! We need to get more
profit from the project
![Page 15: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/15.jpg)
![Page 16: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/16.jpg)
Scenario
![Page 17: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/17.jpg)
Scenario
• Lots of features• Long duration project• Several components:
• API• Behaviours• Out-of-the-box customizations• Huge permission complexity• 3rd party integrations • Etc
![Page 18: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/18.jpg)
The ZAIZI Testing Ecosystem
Coding does not end within the code
![Page 19: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/19.jpg)
The ZAIZI Testing Ecosystem
![Page 20: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/20.jpg)
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…
![Page 21: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/21.jpg)
The ZAIZI Testing Ecosystem : Maven
• The foundations
• Full lifecycle management
• Deliver Alfresco code in any format• War, AMP, Jar, RPM
• Integrate some useful plugins• Surefire• Cobertura• Sonar
![Page 22: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/22.jpg)
The ZAIZI Testing Ecosystem : jUnit
• Unit tests
• Maven surefire integration
• Virtual Alfresco context
• Clean run every time
• Database wiping
• Does not generate the package if some test
fails
![Page 23: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/23.jpg)
The ZAIZI Testing Ecosystem : Mockito
• Mimic components, 3rd parties
• Very useful to isolate your code
• Just test what’s yours
![Page 24: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/24.jpg)
The ZAIZI Testing Ecosystem : Sonar
• Open Source code quality platform
• We used for:
• Check how complex the code is
• Cyclomatic complexity
• Check the style of the code
• Variable/Methods names
• Code coverage• An alternative for cobertura
![Page 25: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/25.jpg)
The ZAIZI Testing Ecosystem : Cobertura (II)
•Line coverage acceptable
•Branch covering not enough
![Page 26: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/26.jpg)
The ZAIZI Testing Ecosystem :JMeter
• Central axis
• Running services automatically
• HTTP: Webscripts
• SMTP: Emails
• Etc
• Used for creating test suites:
• API harnesses
• Emulate users
• Massive requests
![Page 27: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/27.jpg)
The ZAIZI Testing Ecosystem : JMeter (III)
• Test harness purposes:
• Catalog of operations
• Practical examples• Inputs, outputs
• Check unexpected changes visually
![Page 28: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/28.jpg)
DEMO
![Page 29: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/29.jpg)
The ZAIZI Testing Ecosystem : JMeter (IV)
• Functional test purposes
• Collecting use cases
• Emulating them
• Checking the response is the one expected
![Page 30: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/30.jpg)
The ZAIZI Testing Ecosystem : JMeter (V)
• Performance test purposes
• Basic operations executed several times
• Several threads, several users
• Reports for diagnosis
• Combined with Appdynamics
![Page 31: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/31.jpg)
The ZAIZI Testing Ecosystem : Confluence
• Used for uploading reports
![Page 32: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/32.jpg)
The ZAIZI Testing Ecosystem : Confluence
• Checks every single jMeter operation
![Page 33: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/33.jpg)
The ZAIZI Testing Ecosystem : AppDynamics
• Used for checking and montoring the
performance of the applications in the
environments
• Detect slow transactions, memory leaks, etc
• Huge amount of options and configurations
• Could be talking about it for hours
![Page 34: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/34.jpg)
The ZAIZI Testing Ecosystem : AppDynamics
![Page 35: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/35.jpg)
Automated Continous Testing
•Testing without human involvement
• Dedicated server for testing purpose
•Continous deployment purpose
•Configurations close to production
•Repeatable, robust, auditable
Again, thanks to the customer!!
![Page 36: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/36.jpg)
Automated Continous Testing
•Not anymore!!
![Page 37: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/37.jpg)
Automated Continous Testing - Algorithm
![Page 38: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/38.jpg)
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!
![Page 39: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/39.jpg)
Evolutioning the ecosystem
• Making functional tests more functional
• Detecting some behaviors within the log files
![Page 40: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/40.jpg)
Ecosystem 2.0: Splunk
• Monitor Alfresco logs with ‘live’ tests• Detect unexpected outputs• Alert unexpected behaviour
“Would you like to know more?”
![Page 41: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/41.jpg)
Ecosystem 2.0: Selenium
• Limitations with JMeter in Share
• Asynchronous calls are not catched properly
• Selenium is perfect to emulate user&browser
interaction
![Page 42: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/42.jpg)
TDD in Alfresco
• Test Driven Development• Simple software development technique
• Short development cycles
• Focused on deliver what is required, nothing else
![Page 43: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/43.jpg)
TDD in Alfresco
![Page 44: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/44.jpg)
TDD in Alfresco
• Possible thanks to Alfresco and Maven-Surefire integration
• Virtual Database and Alfresco context
![Page 45: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/45.jpg)
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
![Page 46: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/46.jpg)
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
![Page 47: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/47.jpg)
Conclusions
![Page 48: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/48.jpg)
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
![Page 49: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/49.jpg)
Credits (or thanks, thanks, thanks)
• Trafigura• Michael Phan – Technical Architect
• James Bennett – Head of QA
• Ian Carr – Project Manager
![Page 50: Testing Tools in Alfresco](https://reader036.vdocument.in/reader036/viewer/2022081503/56813bf1550346895da527da/html5/thumbnails/50.jpg)
Thank you!