Article for conference booklet:
Testing saves time, allows you to provide code-level checking for your clients' crazy requirements, documents how your code is supposed to work, frees you to refactor your code without fear of breaking things, and ensures you never get the same bug twice. Sounds great! But how do you get started?
This first session will introduce the concepts and basic knowledge required to write tests for Drupal.
Automated testing has been an established best practice in software development for many years, which lets developers spend more time doing fun stuff like writing code and designing applications by automating the testing process. This concept has been implemented for Drupal with the SimpleTest module, which has been integrated into core in Drupal 7. The use of automated tests makes it easy to clearly define the expected behavior of a piece of code; not only does it reduce the need for manual testing but it also results in higher code quality and security.
In this session we will walk you through the process of writing tests for new functionality as well as writing tests to send along with your bug reports. After a brief presentation of the concepts, we will work on real-life examples and write our tests from scratch to show you how easy it is. When using the API provided by SimpleTest, writing tests requires very little PHP programming knowledge so it is accessible even to people who do not describe themselves as developers.
For the examples in this presentation we will use the latest Drupal 7 code, since the primary goal is to get more people writing tests for Drupal core before its release in a few months. However, the API hasn't changed much compared to the contributed SimpleTest module available for Drupal 6, so you will be able to use what you learn during this session and apply it to existing modules.
By coming to this session, you will have all the prerequisites to participate in TestingParty08 on the next day and win awesome prizes!
Bios for conference booklet:
Florian Lorétan, also known as 'flobruit' (pronounce flow-bru-ee), is a web developer from Switzerland, currently working remotely for Achieve Internet while traveling around Europe. He played an important role in the development of many Drupal websites and collaborated with other major Drupal-shops on large projects like fastcompany.com. He is also the author of many core patches and reviews and the creator of the little-known guitar module.
Angela Byron is Senior Web Architect at Lullabot and an Open Source evangelist who lives and breathes Drupal. Quality assurance is one of her specific passions, as she is a firm believer in "if it ain't broke, you ain't trying hard enough." Her ideal way to spend an afternoon is marking patches down to "code needs work" that don't conform to coding standards compliance.
Charlie Gordon is a 10th grade student and an enthusiastic Drupaller. Charlie began using Drupal one year ago, and quickly realized the awesomeness of Drupal.