際際滷

際際滷Share a Scribd company logo
Drupal
              + selenium
         Things work, when they are tested




Lisbon, 25th September 2010
 Hern但ni Borges de Freitas
                                             "
Thanks kompacto !
Drupal + selenium
?
There are no free lunches !

 I want a website made on drupal !

 You can use the bar all saturdays, but I
   want you to build a website for me.

 Anytime you come here, i can ask you
   for improvements on the website.
    I Expect no bugs!
    I expect no downtimes.
    I Want 10M Users.
?
Drupal + selenium
Whatelse do we need?
              Lets do it!

 Each meeting we develop new modules
  and features.

 We can only spend 2 hours on it, and
  we are very tired because is weekend,
  and free beer is not enzimatic.

 We have new people every meeting.

 We cant screw what we have done !
Selenium to save the day
Selenium Storyline

 Record actions you use to perform when doing things on your
   website using IDE.

 Actions are converted in commands.

 Use assertX() and verifyX() to check if you find expected
   elements on DOM.

 Save test case.

 Run them again. Join them in test suites. Run then where you
   want when you want.
Meeting 1 - Demo

 I want to create events

 I want to list them
Meeting 1  Test node creation
Meeting 2  Test event listing
Selenium Selectors

 id=id: Select the element with the specified @id attribute.

 name=name: Select the first element with the specified @name
  attribute.

 xpathExpression: Locate an element using an XPath expression.

 link=textPattern: Select the link (anchor) element which
  contains text matching the specified pattern.

 Css.
Selenium Features

 AJAX compatible (waitForX ...)

 Elements Visible/Hidden

 Verify Common Elements (titles, js alerts, etc..)

 Multi-browser

 Services in the cloud can run these tests for you
Selenium RC

 Run them all , using command line
Selenium RC

 Run a html test suite in Selenium RC

  #/bin/sh

  java -jar selenium-server.jar -htmlSuite *firefox http://kompacto /Users/hernani/
  Sites/kompacto/sites/default/tests/kompacto.suite.html /Users/hernani/Sites/
  kompacto/results.html
Questions ?

More Related Content

Drupal + selenium

  • 1. Drupal + selenium Things work, when they are tested Lisbon, 25th September 2010 Hern但ni Borges de Freitas "
  • 4. ?
  • 5. There are no free lunches ! I want a website made on drupal ! You can use the bar all saturdays, but I want you to build a website for me. Anytime you come here, i can ask you for improvements on the website. I Expect no bugs! I expect no downtimes. I Want 10M Users.
  • 6. ?
  • 8. Whatelse do we need? Lets do it! Each meeting we develop new modules and features. We can only spend 2 hours on it, and we are very tired because is weekend, and free beer is not enzimatic. We have new people every meeting. We cant screw what we have done !
  • 10. Selenium Storyline Record actions you use to perform when doing things on your website using IDE. Actions are converted in commands. Use assertX() and verifyX() to check if you find expected elements on DOM. Save test case. Run them again. Join them in test suites. Run then where you want when you want.
  • 11. Meeting 1 - Demo I want to create events I want to list them
  • 12. Meeting 1 Test node creation
  • 13. Meeting 2 Test event listing
  • 14. Selenium Selectors id=id: Select the element with the specified @id attribute. name=name: Select the first element with the specified @name attribute. xpathExpression: Locate an element using an XPath expression. link=textPattern: Select the link (anchor) element which contains text matching the specified pattern. Css.
  • 15. Selenium Features AJAX compatible (waitForX ...) Elements Visible/Hidden Verify Common Elements (titles, js alerts, etc..) Multi-browser Services in the cloud can run these tests for you
  • 16. Selenium RC Run them all , using command line
  • 17. Selenium RC Run a html test suite in Selenium RC #/bin/sh java -jar selenium-server.jar -htmlSuite *firefox http://kompacto /Users/hernani/ Sites/kompacto/sites/default/tests/kompacto.suite.html /Users/hernani/Sites/ kompacto/results.html