Creating a workflow with the actions and triggers system
is a key administrative task for any Drupal site. However,
would you manually check each new patch to insure that it
does not break some part of this functionality?
The Simpletest module provides a framework for running automated unit tests
in Drupal. Unit testing involves taking a small portion of code, a unit,
and subjecting it to programmatic tests to prove its correctness. This can
be extremely useful to help insure that new code does not introduce bugs
into existing functionality. Thus, having a full suite of unit tests for
Drupal 6.x core functionality using the Simpletest module would be a major
step forward for the project and would help insure that only high-quality
code is committed. In addition to helping developers test their code, new
tests for core Drupal functionality will be used for automated testing by
http://testing.drupal.org.
Your overall task will be to create an ActionsTestCase class which would
be the basis for all actions/triggers test cases. The first step of the
task will be to evaluate functions that would be useful in an ActionsTestCase.
Compile a list of at least ten (10) functions that might be useful for the
ActionsTestCase. Next, you will create the easily extendable class, with
all of the functions proposed (through in a few more for kicks if you want).
Last, you must make five (5) tests that extend the ActionsTestCase, to
demonstrate the usage of the new class.
Resources:
http://drupal.org/simpletest
http://drupal.org/project/simpletest
http://www.lullabot.com/articles/introduction-unit-testing
http://cwgordon.com/the-power-of-drupal-simpletests-and-the-simpletest-r...
GHOP issue: http://code.google.com/p/google-highly-open-participation-drupal/issues/...
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | zipped_files_2.zip | 3.45 KB | cwgordon7 |
| #4 | actions_test_case.php_.txt | 5.17 KB | cwgordon7 |
| #4 | various_tests_to_be_placed_in_tests_folder.zip | 3.43 KB | cwgordon7 |
| #4 | simpletest_actions.patch | 596 bytes | cwgordon7 |
| #2 | Click here to download a virus! (Just kidding...) | 5.15 KB | cwgordon7 |
Comments
Comment #1
dmitrig01 commentedClaimed by cwgordon7
Comment #2
cwgordon7 commentedactions_test_case.php, the "easily extendable class", is attached.
Comment #3
dmitrig01 commentedLooks good!
I hereby approve you to go further.
Comment #4
cwgordon7 commentedNeeds review
Comment #5
cwgordon7 commentedRevised, and reattached
Comment #6
cwgordon7 commentedThis needs serious work.
Comment #7
boombatower commentedThis was committed a long time ago.
The thread to clean up the test is now located http://drupal.org/node/260501.
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.