0
SimpleTest, Drupal 7 & You <ul>Miguel Hernandez LA Drupal (Echo Park) July 21, 2010 </ul>
Who Am I? <ul><li>Miguel Hernandez -  http://migshouse.com
Founder/Head Geek @ the OpenMindz Group  -  http://openmindz.net
Member of Drupal’s Core Patch Testing Team since 2009
Started working in Software QA in 1999
Huge passion for breaking things & seeing how they work </li></ul>
Why Should You Care? <ul><li>SimpleTest included in Drupal 7 Core
Module is now called ’Testing’
Produce better code
Improves & speeds up SDLC
Best practices approach to development
Test-driven development (TDD) </li></ul>
What is SimpleTest <ul><li>An open source unit testing framework for PHP
Upcoming SlideShare
Loading in...5
×

Simple test drupal7_presentation_la_drupal_jul21-2010

1,012

Published on

Presentation I gave @ LA Drupal meetup (in Echo Park) on July 21, 2010 on SimpleTest integration into Drupal 7.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,012
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Simple test drupal7_presentation_la_drupal_jul21-2010"

  1. 1. SimpleTest, Drupal 7 & You <ul>Miguel Hernandez LA Drupal (Echo Park) July 21, 2010 </ul>
  2. 2. Who Am I? <ul><li>Miguel Hernandez - http://migshouse.com
  3. 3. Founder/Head Geek @ the OpenMindz Group - http://openmindz.net
  4. 4. Member of Drupal’s Core Patch Testing Team since 2009
  5. 5. Started working in Software QA in 1999
  6. 6. Huge passion for breaking things & seeing how they work </li></ul>
  7. 7. Why Should You Care? <ul><li>SimpleTest included in Drupal 7 Core
  8. 8. Module is now called ’Testing’
  9. 9. Produce better code
  10. 10. Improves & speeds up SDLC
  11. 11. Best practices approach to development
  12. 12. Test-driven development (TDD) </li></ul>
  13. 13. What is SimpleTest <ul><li>An open source unit testing framework for PHP
  14. 14. Unit testing is a method by which individual units of source code are tested to see if they are fit for use
  15. 15. A unit is the smallest testable part of an application, web or otherwise
  16. 16. In Drupal, the smallest units are functions </li></ul>
  17. 17. Why is it included in D7 core? <ul><li>Needed a way for developers & contributors to produce better code
  18. 18. Drupal needed a framework for running automated unit tests
  19. 19. Helps immensely in taking Drupal from alpha > beta > release candidate
  20. 20. Developers can now include tests w/their modules </li></ul>
  21. 21. Setting up SimpleTest <ul><li>Ensure module is enabled
  22. 22. Check settings at /admin/config/development/test/settings
  23. 23. Performance, Logging/Errors, Maintenance Mode, Testing </li></ul>
  24. 24. Performance <ul><li>Clearing the cache is very important if you’re not seeing a test that should be there (i.e. One that you just created)
  25. 25. Caching & Bandwidth Optimization can be set on an as-needed basis </li></ul>
  26. 26. Logging & Errors <ul><li>It is suggested to set ’Error Messages to Display’ to ’All Messages.’
  27. 27. However, if the site is running in a production environment, set it to not display any messages
  28. 28. This is due to performance reasons </li></ul>
  29. 29. Maintenance Mode <ul><li>It is suggested to place the site in ’Maintenance Mode’
  30. 30. Especially, if running on a production environment
  31. 31. Remember to login with an admin user at http://yoursite.com/user </li></ul>
  32. 32. Debug settings <ul><li>View/edit Testing Settings at /admin/config/development/testing/settings
  33. 33. Clearing results after each test is run is good but you might want to keep them (i.e. Viewing of results over time, etc.)
  34. 34. Verbose mode is highly suggested to be turned on </li></ul>
  35. 35. Let’s see it in action! <ul><li>/admin/config/development/testing
  36. 36. Provides a complete list of all tests included in both core & through contributed modules
  37. 37. Can select individual tests, a group of tests by test type or ALL tests </li></ul>
  38. 38. That’s it! <ul><li>Not as hard as you thought, eh?
  39. 39. Next time, we’ll go over how to create your own test cases for your own modules & how to incorporate them into your daily workflow
  40. 40. Or you can see my session @DrupalCampLA:
  41. 41. http://2010.drupalcampla.com/sessions/simpletest-intro-how-get-started-why </li></ul>
  42. 42. Resources <ul><li>http://simpletest.org
  43. 43. http://drupal.org/simpletest-tutorial
  44. 44. http://drupal.org/project/simpletest
  45. 45. http://drupal.org/unit-testing
  46. 46. http://acquia.com/files/test-results/index.html
  47. 47. http://drupalcampla.com
  48. 48. http://migshouse.com </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×