Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Automated Testing and Drupal

From DrupalCon Chicago 2011, Treehouse Agency Chief Architect Steven Merrill sheds light on the powerful practices of automated testing and continuous integration in Drupal project development.
by

Phase2 Technology

on 21 May 2011

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Automated Testing and Drupal

Automated Testing and Drupal The Goal Continuous Integration How can SimpleTest be harnessed to do test-driven development in Drupal? How can a continuous integration system like Hudson be used to continually test and deploy code to different environments? That's What I'm Talkin' About How can external testing frameworks like Selenium be brought into Drupal? Other than running SimpleTest-based tests, what other automated tools can be brought to bear to improve the quality of your code? What other testing technologies should Drupal look to integrate in the future? integrate code often to minimize conflicts get code deployed to a production-like environment quickly Why use Automated Testing? have a robot run the boring tasks find regressions easily compare yourselves to the competition unit testing functional testing front-end performance testing What Automated Testing Is a substitute for qa people easy to do for distributed systems What Automated Testing is Not Hudson/Jenkins is the Engine integrate with a VCS to automatically: run tests deploy new code report SimpleTest is
the Tool simpletest in core what is simpletest? how do you run a simpletest? how do you monitor run tests automatically with drupal? simpletest improvements in contrib how to do drupal-based functional/unit testing downsides speed training Other Tools coder / checkstyle for code style compliance JSlint for JavaScript coding style compliance Front-End Performance graded performance waterfall resource graph everything Back-End Performance jmeter Advanced AJAX Functional Testing selenium jquery update and jquery ui 1.8.x and up What can we Learn from the Competition? other frameworks have selenium in core more advanced frameworks do behavior-driven development automatic generation of test values A Vision for Drupal 8 selenium testing used for core with a runner in core Feature: Addition
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers Scenario Outline: Add two numbers
Given I have entered 50 into the calculator
And I have entered 70 into the calculator
When I press add
Then the result should be 120 on the screen Feature: Addition
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers Scenario Outline: Add two numbers
Given I have entered [input_1] into the calculator
And I have entered [input_2] into the calculator
When I press [button]
Then the result should be [output] on the screen Examples:
| input_1 | input_2 | button | output |
| 20 | 30 | add | 50 |
| 2 | 5 | add | 7 |
| 0 | 40 | add | 40 | behavior-driven development to make writing tests easier Feature: Contributor Permissions
In order to keep editorial control in the hands of editors
As a contributor
I should be able publish only my own articles Background:
Given a user named a with role contributor
And a user named b with role editor Scenario: Publishing my own content
Given a node of type article authored by a with title Awesome Article
And I am logged in as a
When I edit the article with title Awesome Article
And I set the Published field to TRUE
And I press submit
Then I should see the message Your article was published Scenario: Publishing an editor’s content
Given a node of type article authored by b with title Super Article
And I am logged in as a
When I edit the article with title Super Article
Then I should see the message Access denied
Full transcript