Continuing on the knowledge that we learned last week, this week's release includes more tutorials in the testing Drupal 7 with SimpleTest series. Now that you know some terminology and how to run a test, we're going to start writing some tests. We'll start simple with the classic "Hello World!" example. Then we'll take a look at the various types of assertions we can make about the outcome of any actions we perform on our site using the SimpleTest browser. And then we'll dive into using the SimpleTest browser to simulate human interaction with our application. We'll do things like click on links and fill out forms.
We'll wrap things up this week by taking a look at how to perform user authentication with the SimpleTest browser so that we can log in as a privileged user on our site. Doing so allows us to write functional tests for parts of our application that might be restricted to authenticated users.
The tutorials for this week include:
- Learning Test Case Basics by Writing a Hello World Test (FREE)
- Different Types Of Assertions in SimpleTest
- Navigating a Site with SimpleTest's Browser
- Testing and Submitting Forms with SimpleTest
- Handling Users and Permissions in SimpleTest
After completing these tutorials, you'll know how to start writing a test case, register it with SimpleTest, and then run it. You'll be able to define the various types of assertions you can use when writing your tests and know which ones to use when. And you'll be well on your way to writing functional tests that use the SimpleTest browser to simulate interacting with your site just like a human would. Just think of all the clicking you'll never do again and all the form fields that will fill themselves in the future!
Next week we'll wrap things up in the testing Drupal 7 with SimpleTest series by taking a look at creating dummy content, submitting forms with AJAX, uploading files, writing unit tests, and testing a clone of a pre-existing site.
Add new comment