Welcome to the group for the plumbers who keep the community plumbing from leaking. ;)
Testing frameworks such as SimpleTest and Selenium, automated testing, and general community QA initiatives are all on-topic here.
Manual testing is also totally on-topic.
JavaScript Tests
As we upgrade the JavaScript libraries in D7 to jQuery 1.4 and to jQuery UI 1.8 we need a standard set of browsers to test against and standard set of tests to run. This is an initial set. Please update if you have additions.
Read moredata-driven webtest of drupal using Java grails
I just wrote up how I wrote a data-driven webtest of Drupal and I wanted to share my write up.
I copied my full write up, but missing some of the screenshots from http://www.philliprhodes.com/content/testing-drupal-grails-webtest
I was implementing a Drupal site with a custom module that uses a custom mysql database. The client reported problems with a custom module. I tried reproducting the problem, but after trying 20 some combinations out of 1000+ test elements, I wasn't able to reproduce the questionable behavior.
Enter grails with webtest.
Read moreWhen automated acceptance tests and unit tests were incorporated to drupal?
I would like to know when automated acceptance tests and unit test were included in drupal. Which of them were developed first? In which versions or iterations? Which tools were used?
Read moreSimpletest and CCK types
Hey all,
Ive been exploring the wonderful Drupal framework for some weeks now, been reading alot about modules, module development and theming. In the last few weeks i have developed some small modules that i want to test using the Simpletest module.
Ive read the documentation and the tutorial to get some sense of how to set up Simpletest for my modules. So i thought i would start by making some functional tests for my custom CCK types. So far i haven't had much luck, ive been wrestling Simpltest for a while now and its not returning the love so far :P
Regular London code sprints...?
To all London (and UK) folk,
Having just got back from a mind blowing DrupalCon Paris, we were discussing on the train back the possibility of starting a regular London based code sprint. Brightlemon would be happy to host and organise it - provide the logistics etc.
Call for Linux experts for debugging/tuning and server donations
The test bot from testing.dupal.org has fundamentally changed the way that core development happens in Drupal 7. By automatically testing every single patch, and ensuring that Drupal continues to install properly and pass all automated tests, we can ensure that Drupal 7 remains the most stable development release to date, and can save our patch reviewers tons of time that would otherwise be spent manually verifying that patches do not break existing functionality.
However, the test bot urgently needs your help!
Read moreDo you test new modules before uploading them to your live site?
Mock Web Service for SimpleTest
Here is a very short module to assist in testing other modules that refer to web services. It is somewhat modeled on what is being done to test openid in version 7, but more generic and simpler. Should I propose that this module get included with simpleTest? Is there other, better ways to do this? Any other feedback would be appreciated. Thanks!
Read moresending a cookie in the simpletest browser
I need to test cookie integration with a 3rd party site.
The 3rd party site sets a cookie, Drupal sees this cookie, validates it, and logs in the user. I planned to test this by setting a cookie in my simpletest
I tried a couple of variations on:
<?php
$this->drupalGet('node', NULL, array('Cookie: cookiename=cookievalue;'));
?>but the "cookiename=cookievalue" bits always got jammed onto the end of the SESS... cookie.
I grepped through core and didn't find any situations where we are sending a cookie along with the drupalGet. Any advice?
Read moreSeeking best practices or examples for writing tests for modules that require CCK set-up
The module I'm working on is a widget module, so its effects can only be seen and tested when at least one content type has been configured with its field.
All this configuration has to be done in this test? In this case, adding a field to a content type and selecting the widget. Any examples, advice, or alternatives for this?
Separate but related: Testing starts each time with a blank slate, but is it possible instead to have the tests run with a copy of a current database? That seems like a good way to help catch bugs that can arise out of different configurations.
Read moreUsing database transactions with Drupal unit tests
Recently I've been experimenting with running unit tests for Drupal from the command line (with PHPUnit, not SimpleTest). One thing I tried was creating an entirely separate test database to hold test data, and also running each unit test in a separate database transaction in order to speed up testing, and to make it easier to handle test data.
If anyone is interested see: http://patshaughnessy.net/drupal-test-database
Read moreNeed reviews on assigning permissions in SimpleTest
Several core tests (contact, comment, poll) have a need to be to adjust the permissions for anonymous users. We can easily adjust permissions for users by calling drupalCreateUser() with different permissions, but we don't have an easy way to do the same thing for anonymous users. As of now, the tests have to add an admin user with the permission 'administer user permissions' and use drupalPost() to adjust the admin/user/permissions page. This implementation is ugly and wasting effort by duplication.
Since we provide the drupalCreateUser() and drupalCreateRole() methods in DrupalWebTestCase, I proposed adding a drupalSetPermissions() that could be easily reused throughout core tests and would be very handy for a lot of contrib module tests. But it needs more reviews.
Read moreTesting contrib module integration with other contrib modules
I am writing a test for one of my contrib modules that has a feature that is enabled when another contrib module (we'll call it OtherModule) is enabled. I want other people other than myself to be able to run the entire test suite, but what if they didn't have OtherModule installed or even present in their Drupal installation? The test is going to fail spectacularly in that case. So here's what I came up with for my module:
Read moreD6 installation profile for testing CCK date fields now available
I just released an install profile for D6 core that sets up a test site for trying out all the combinations of CCK date field configurations: CCK Date Testsite. I've discovered various bugs in Signup's handling of CCK date fields (and have been fleshing out bugs and limitations in DateAPI itself with KarenS's help). I was spending a lot of time just configuring a reasonable test site to try different combinations of CCK date field types (Date, Datestamp, vs. Datetime) and timezone handling (there are 5 different ways date fields can handle timezones). So, I quickly decided the time spent automating the test site would easily save me time in the long run. And, I hope this profile will be useful to other folks working with DateAPI and CCK date fields.
Read moreTesting the theme system: how?
http://drupal.org/node/333060 is the perfect example of something completely tweaky that is likely to get broken in the future when some well-meaning person goes through here trying to "optimize" the flow of things. AKA, something we really ought to have automated tests for.
In order to write a proper test, we would need the following:
a) The ability to make hidden themes like we have hidden modules.
b) The ability to enable those themes even though they're not in the UI.
Problems testing function url() with statics
For one of the testing party issues I ran across a problem trying to test the url function. The issue is located here:
http://drupal.org/node/296324
As posted over there my question is this:
I'm having problems doing this test... the problem is in the code of url:
static $script;
static $clean_url;
if (!isset($script)) {
// On some web servers, such as IIS, we can't omit "index.php". So, we
// generate "index.php?q=foo" instead of "?q=foo" on anything that is not
// Apache.
Quality Assurance-related core patches
Last updated by birdmanx35 on Wed, 2009-01-28 15:41
(Note: I have moved the contents of this node to a sub-page of the http://drupal.org/community-initiatives/drupal-core section: http://drupal.org/node/365527 - birdmanx35)
Read moreDrupal testing patterns
Last updated by damien tournoud on Tue, 2008-09-23 07:40
Here is an effort at documenting Drupal testing patterns from what's currently used in core tests. The objective is to promote reusability of standardized patterns throughout core and contributed tests.
// Catch - this looks good, but I think we should completely ignore stuff like getContent() which is used once per year and just focus one what 70% of basic tests will use - the API docs etc. are there, and linkable at the end, for everything else.
Read moreOne SimpleTest template to rule them all
Last updated by webchick on Sun, 2008-11-23 06:54
It stands to reason that the tests in simpletest/tests will be the ones that people will use to base their own tests. These tests were written by at least 5-6 different people, and it shows. As a result, it's really confusing for a new developer to get a sense of what your own module's SimpleTest integration ought to look like.
Read more






