Drupal Core Test Suite

You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

This is a list of manual tests I perform every time I test Drupal 6.x core. I figure this is maybe a good start for things that we should have unit tests for. If nothing else, it provides a checklist for people who make changes to other modules of things to try to ensure they still work. Please feel free to add to this list!

Common things to check for:
- Visible errors (notices, warnings, etc.)
- Broken functionality
- "White screens of death (WSOD)" - Basically a completely blank screen when you go to a page.
- Regressions (when something used to work in a previous version of Drupal and no longer does)
- Broken links
- Incomplete or unclear help text/descriptions
- Typos in text, comments or code.

Path Test description Pass Fail N/A
INSTALLER
install.php Attempt installation of a different profile than 'default'.
install.php?profile=X Attempt non-English installation.
profile=X&locale=X Leave fields blank, submit. Should provide errors about missing fields.
profile=X&locale=X Put in invalid database credentials. Should provide errors about not being able to connect.
profile=X&locale=X Enter invalid e-mail addresses for first user and site.
profile=X&locale=X Enter non-matching passwords.
profile=X&locale=X Test Configure Site page without JavaScript.
profile=X&locale=X Test installation with table prefixes.
profile=X&locale=X Test installation on shared hosting server.
profile=X&locale=X Test installation with mysqli rather than mysql.
profile=X&locale=X Test installation with non-standard database like pgsql.
profile=X&locale=X Remove settings.php and install Drupal over an existing Drupal installation.
profile=X&locale=X Try pointing at an existing, non-Drupal database containing tables like 'users'.
MODULE SYSTEM
admin/build/modules Enable all core modules (Web developer toolbar - Forms > Populate form fields).
admin/build/modules Attempt to enable a module with non-enabled dependencies, for example by disabling comment and enabling forum.
admin/build/modules Disable and uninstall a module, such as aggregator.
NODE SYSTEM
node/add/story Create a simple "story" post.
node/add/story Test Preview.
node/add/story Test Submit.
node/#/edit Test Edit.
node/#/edit Test Delete.
node/#/edit Test teasers.
node/#/edit Create a new revision. Enter a log message and ensure that it shows up @ node/#/revisions
node/#/revisions Revert to a previous revision.
node/#/revisions Delete a revision.
USER SYSTEM
user/register Register a new user.
user/login Login.
user/password Reset password.
user/#/edit Save user profile.
user/#/edit Delete user.
user As logged-in user, confirm you are taken to your user profile.
user As anonymous user, confirm you are taken to the login form.
ACTIONS MODULE
admin/build/actions/assign/node Assign an action.
admin/build/actions/assign/node Remove an assigned action.
admin/build/actions/assign/node Attempt to assign the same action twice.
admin/build/actions/manage Configure an advanced action.
admin/build/actions/config/# Edit advanced action.
admin/build/actions/delete/# Delete an advanced action.
[various] Comfirm simple action takes place when it should.
[various] Comfirm advanced action takes place when (and how) it should.
COMMENT MODULE
node/# Preview a comment.
node/# Submit a comment.
node/# Edit a comment.
node/# Delete a comment.
node/# Reply to a comment.
node/# Delete a comment with sub-replies.
FORUM MODULE
admin/content/forum/add/container Add a forum container.
admin/content/forum/add/forum Add a forum.
admin/content/taxonomy/edit/vocabulary/# Edit the forum vocabulary.
node/add/forum Create a new forum topic.
node/add/forum Attempt to add a forum topic to a container, rather than a forum (this should not work).
node/#/edit Move a forum topic from one forum to another.
node/#/edit Move a forum topic from one forum to another, leaving a shadow copy (confirm existence of shadow copy).
MENU MODULE
admin/build/menu-customize/navigation Enable a disabled item.
admin/build/menu-customize/navigation Disable an enabled item.
admin/build/menu-customize/navigation Reset a changed item.
admin/build/menu-customize/navigation/add Add a menu item.
admin/build/menu-customize/navigation Edit a menu item.
admin/build/menu/add Add a menu.
admin/build/menu-customize/X/edit Edit a menu.
admin/build/menu-customize/X/edit Delete a menu.
admin/build/menu-customize/navigation/add Enter an invalid path.
TAXONOMY MODULE
admin/content/taxonomy Create a vocabulary.
admin/content/taxonomy Edit a vocabulary.
admin/content/taxonomy Delete a vocabulary.
admin/content/taxonomy Delete a vocabulary.
node/add/X Confirm that drop-down shows for one of vocabulary's enabled content types.
node/add/X Confirm that drop-down doesn't show for one of vocabulary's disabled content types.
UPLOAD MODULE
node/add/story Attach a simple text file.
node/add/story Test that file appears on Preview.
node/add/story Test that file appears on Submit.
node/add/story Uncheck "List" on a file and confirm that it doesn't show on the node when viewed.
node/add/story Delete a file.
node/add/story Attempt to upload an insanely large file, like a video file.
node/add/story Click "Attach" without having browsed for a file.
node/add/story Upload file without JavaScript enabled.
admin/settings/uploads Try changing the maximum resolution and confirm it works (non-user 1 only).
admin/settings/uploads Try changing the allowed files filter and confirm it correctly blocks files (non-user 1 only).
admin/settings/uploads Try changing the upload limit and confirm it works (non-user 1 only).
JAVASCRIPT
node/add/story Check if collapsing/expanding fieldsets work.
node/add/story Check if the autocomplete form fields (e.g. "Authored by") work.
node/add/story Check if the teaser splitter works.
node/#/outline With book.module enabled: Check if the parent selector works.
node/add/story With upload.module enabled: Test attaching a new file.
any Check if logging in with OpenID works.
admin/content/node Check if a row gets highlighted when selected.
Check if you can select multiple rows with shift+click.
Check if you can select all rows by clicking at the checkbox in the table header.
admin/user/access Scroll down the page. The table header should keep floating at the top of the viewport.
admin/build/themes/settings/garland Check if the color picker works.
admin/user/user/create Check if the password strength indicator and password match indicator works.
admin/settings/clean-urls See if it detects clean urls.
admin/build/menu-customize/navigation Test drag & drop behavior for a complex menu.
admin/build/block Move blocks by drag and drop. Check with drop down menus too.
admin/content/taxonomy/# Drag & drop hierarchy of terms within a vocabulary. This tests taxonomy.js

Comments

Great list

Rok Žlender's picture

Thanks webchick this is an amazing list.
I'll try to find a moment and write which of this items already have a test.
If someone writes a test please post to http://drupal.org/node/173461

Fuzz testing

dww's picture

At UW-Madison's CS department (my day job) one of the groups has done a lot of work with fuzz testing. They write code to automatically generate random input to any kinds of programs you wish to test. It's a great way to catch bugs in your error handling.

Such tests would be fantastic for all aspects of the Drupal UI (FAPI, menu/path system, settings pages, etc), and should be relatively easy to automate. Any volunteers?

Can we have an expected-output string column?

allisterbeharry's picture

One request - can there be an expected output column contain a string that would appear on the page if the action succeeded. This could be used by auto unit-test tools like the simpletest module or DAST or tinderbox to implement this list as test suites and pass/fail a test based on the expected-output string. For example if doing a node/add/story didn't have "your story was created" string on the page, this test could be flagged as failed.

List of tests that are

Rok Žlender's picture

List of tests that are currently done by simpletest

  • Node
    • Node creation
    • Edit node anonymous, not allowed
    • Edit node registered, not allowed
    • Node delet (taxonomy tests)
  • Profile
    • Add/Edit/Delete/check in user edit/insert profile
    • fields tested single line textfield/textarea/list/checkbox/url/selection/date/textfield
    • Two profile textfield required, weighted and visible at registration
  • Taxonomy
    • Create/delete vocabulary
    • Add terms
    • Create related term/hierarchy
    • Create node with multiple terms
  • User

    • User image not an image/ good image/ image resizing/ with GD not installed error if image wrong dimensions/size / all OK
    • Blocking user names
    • Register user

    • Wrong password
    • Send url with onetime login link
    • Password change
    • Logout/Login
    • User name and email validation
  • xmlrpc
    • Test if data is send correctly via xmlrpc call data types testedArray/array in array/many types /string/nested struct
    • multicall

Should we incorporate into the table in another column simpletest and out a big X where there are tests for it.

The more simpletests the better

dww's picture

The more of this list we can automate via simpletest, the better. Yes, we should make another column here for if a simpletest exists, and encourage people to work on filling in that column as much as possible. Thanks!

We should add drag and drop

catch's picture

We should add drag and drop + node/add/poll to the js section:

node/add/poll Check the "add more" button
admin/build/taxonomy check drag/drop saving of vocabularies and taxonomy terms
admin/build/block Check drag/drop and saving of blocks
admin/build/menu Check drag/drop and saving of menu items and menu tres
admin/content/book ditto for books
admin/user/profile Check drag, drop and saving of profile categories.
(all of these should be tested with both keystrokes and the mouse)

go ahead, it's a wiki page

Frando's picture

go ahead, it's a wiki page ;)

forum - broken

andypost's picture

Assign another node type to forum vocabulary
Add more forums via taxonomy edit and assign 2 parents to forum