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 the Book module #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
One of the ways to organize content in Drupal is the book module. You can 
use books for manuals, site resource guides, Frequently Asked Questions 
(FAQs), or whatever you'd like. The main work for this task is to write 
tests for this 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 small suite of tests to check 
the functionality of book module, specifically:
* create a new book
* create a small hiearchy of pages in there
* check the list of children links
* check from a children test the next, prev, up links
* check the printer friendly version of the book

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/207192

Original issue reported on code.google.com by chx1...@gmail.com on 7 Jan 2008 at 8:24

GoogleCodeExporter commented 9 years ago

Original comment by chx1...@gmail.com on 7 Jan 2008 at 8:25

GoogleCodeExporter commented 9 years ago

Original comment by chx1...@gmail.com on 7 Jan 2008 at 8:26

GoogleCodeExporter commented 9 years ago
I forgot to mention: a very very crude start for the tests can be created from 
the 
browser with http://drupal.org/project/simpletest_automator -- generated tests 
need 
serious cleanup and editing.

Original comment by chx1...@gmail.com on 7 Jan 2008 at 8:46

GoogleCodeExporter commented 9 years ago
Also see 
http://www.lullabot.com/articles/drupal-module-developer-guide-simpletest

Original comment by chx1...@gmail.com on 8 Jan 2008 at 2:25

GoogleCodeExporter commented 9 years ago
I claim this task.

Original comment by j.boomba...@gmail.com on 9 Jan 2008 at 5:31

GoogleCodeExporter commented 9 years ago

Original comment by chx1...@gmail.com on 9 Jan 2008 at 6:48

GoogleCodeExporter commented 9 years ago
Adding missing labels to mark the claim.

Original comment by webchick...@gmail.com on 9 Jan 2008 at 6:53

GoogleCodeExporter commented 9 years ago
Marking as needs review.

Original comment by acli...@gmail.com on 10 Jan 2008 at 12:01

GoogleCodeExporter commented 9 years ago
Student did an exceptional job with writing these tests. Tests are very well 
thought
through. Also our every suggestions and request was dealt with. Thank you for 
your work.

Original comment by rok.zlen...@gmail.com on 11 Jan 2008 at 11:07

GoogleCodeExporter commented 9 years ago
Final submission.

Original comment by j.boomba...@gmail.com on 12 Jan 2008 at 5:30

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by acli...@gmail.com on 21 Jan 2008 at 4:05