gcode-mirror / google-highly-open-participation-drupal

Automatically exported from code.google.com/p/google-highly-open-participation-drupal
0 stars 0 forks source link

Write Simpletest tests for comment #164

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To be able to leave comments on posts is an essential functionality. The main 
work for this task is to write tests for comment module.

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.

For this task, you need to first install and familiarize yourself with the  
simpletest module (use the cvs HEAD version with Drupal HEAD/6.x RC):
http://drupal.org/project/simpletest
http://drupal.org/simpletest
http://www.lullabot.com/articles/introduction-unit-testing

The main work for this task is to write a suite of tests to check the 
functionality of comment module. Note that in Drupal 6 the comment settings are 
per content type ((admin/content/types). The tests:
* Set up comments without a subject. Check that the subject field is not there.
* Set up comments to have a subject. Preview, submit, reply, edit, delete a 
comment. Check the reply is gone too.
* Set Preview comment to required. check that it is indeed required.
* Check both locations of the comment submission form work: the form and 
submissions works.
* Check all three options of anonymous commenting: leave comments with or 
without 
contact information as appropriate
* Check admin/content/comment and admin/content/comment/approval for 
correctness: 
publish / unpublish / delete a comment. Post a comment with a user that has no 
"post comments without approval" only "post comments" and check the comment is 
not visible for other users. Approve it and see it is.

Proper validation of your new tests will ideally include changing the  Drupal 
core 
code to break the tested functionality and then confirming that your tests 
report 
a failure.  Ideally, post each such change as a  patch to help the reviewers.

This suite should be written as a single .test file and should achieve RTBC 
status 
in the Simpletest module issue queue.  Post files/patches to this issue: http://
drupal.org/node/212261

Original issue reported on code.google.com by chx1...@gmail.com on 20 Jan 2008 at 5:47

GoogleCodeExporter commented 9 years ago
I claim this task.

Original comment by j.boomba...@gmail.com on 21 Jan 2008 at 1:45

GoogleCodeExporter commented 9 years ago
All yours. :)

Original comment by webchick...@gmail.com on 21 Jan 2008 at 2:24

GoogleCodeExporter commented 9 years ago
Initial submission. Details at http://drupal.org/node/212261.

Original comment by j.boomba...@gmail.com on 21 Jan 2008 at 6:57

GoogleCodeExporter commented 9 years ago

Original comment by acli...@gmail.com on 21 Jan 2008 at 12:23

GoogleCodeExporter commented 9 years ago

Original comment by chx1...@gmail.com on 21 Jan 2008 at 9:23

GoogleCodeExporter commented 9 years ago
Please upload your patch here as well.

Original comment by acli...@gmail.com on 22 Jan 2008 at 12:45

GoogleCodeExporter commented 9 years ago
Final submission upload.

Original comment by j.boomba...@gmail.com on 28 Jan 2008 at 3:07

Attachments:

GoogleCodeExporter commented 9 years ago
Ok, thanks.

Original comment by acli...@gmail.com on 28 Jan 2008 at 3:38