MeetMagento - Acceptance tests in Magento

1,130 views
1,022 views

Published on

Create acceptance tests using Menta Framework. If you want to use it just download from GitHub https://github.com/AOEmedia/Menta_SampleProject

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,130
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
18
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

MeetMagento - Acceptance tests in Magento

  1. 1. Tomasz Grzemski @Grzemski Tymoteusz Motylewski @tmotyl Acceptance testing in Magento
  2. 2. Who we are? • Macopedia founders • Web Applications enthusiasts • Open Source Evangelists
  3. 3. Macopedia • • • • Software House Open Source and Scrum Lovers Enterprise Web Applications 3 offices in Poland (Poznan, Warsaw, Cracow)
  4. 4. Continuous { Development Integration Delivery Deployment Improvement
  5. 5. “Continuous” == “Doing stuff over and over again” == “Automation” Builds Deployment Tests Infrastructure Setup Devbox Setup
  6. 6. Everything sounds better with “continuous” Continuous Quality Assurance
  7. 7. Developers DB + Backup
  8. 8. “Continuous” Integration server DB Integration Settings Files Server Unit tests Acceptance tests Load tests
  9. 9. Acceptance Tests
  10. 10. test automation is a developer’s task
  11. 11. Selenium for PHP • • • • • PHPUnit_Selenium WebDriver-PHP PHP-webdriver-bindings PHP-webdriver ...
  12. 12. Architecture REST* (over HTTP) No direct access (DB, classes,…) AUT HTTP *http://code.google.com/p/selenium/wiki/JsonWireProtocol
  13. 13. Selenium 2 Testing Framework for PHP Menta
  14. 14. Menta • Created by Fabrizio Branca from AOE (Wiesbaden - Germany) • PHP Test Acceptance Framework • github.com / AOEmedia / Menta_SampleProject
  15. 15. Menta Features PHPUnit integration Configuration Management Components Event / Observer Session Management ? Bonus Features :)
  16. 16. Abstract test class ProjectY_Abstract_TestCase Menta_PHPUnit_Testcase_Selenium2 PHPUnit_Framework_TestCase Very thin layer on top of PHPUnit ProjectY_TestCase_Registration ProjectY_TestCase_Checkout the “magic” happens in the components
  17. 17. Components Components!
  18. 18. Components Common Assert Wait Screenshot Selenium1Facade Imap WebService W3C Validator Curl … Some might not even require a Selenium session
  19. 19. Component Libraries Projectspecific Magento (your library) Magento (community-provided) General (your library) Menta
  20. 20. Components Rewrites add functionality change behavior change locators overwrite labels ProjectZ_PageObject_Cart PageObject_Cart extends
  21. 21. Page Objects clickCheckoutButton() isInCart($product) getTotals() ✔ ✔ ✔ represents services offered by a page or feature is the only thing with a deep knowledge of the HTML
  22. 22. Sessions Managment incl. on exceptions and ctrl+c auto-close Cleaning sessions Reusing sessions auto-start Let Menta manage your sessions
  23. 23. Screenshot Gallery
  24. 24. Screenshots HTML Report (on demand and on failure) additional messages test description from phpdoc error details
  25. 25. Bonus!
  26. 26. Perceptual diffsdiffs Perceptual Build X Build X-1 Perceptual Diff
  27. 27. Selenium performance • Selenium GRID • Use cloud services
  28. 28. github.com / AOEmedia / Menta github.com / AOEmedia / Menta_SampleProject
  29. 29. Poznań Magento User Group 19 listopada 17:30 pmug.pl
  30. 30. s! U ith W or k w Q&A t.grzemski@macopedia.pl @Grzemski t.motylewski@macopedia.pl @tmotyl

×