Release Day: Forms, Permissions, and More Testing Drupal 7 with SimpleTest

Image
Weekly Release

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:

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

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code class> <ul type> <ol start type> <li> <dl> <dt> <dd><h3 id> <p>
  • Lines and paragraphs break automatically.

About us

Drupalize.Me is the best resource for learning Drupal online. We have an extensive library covering multiple versions of Drupal and we are the most accurate and up-to-date Drupal resource. Learn more