Re: PHP-GTK 2 Unit Testing
| From: | Scott Mattocks | Date: | Tue, 28 Feb 2006 19:17:11 +0000 |
| Subject: | Re: PHP-GTK 2 Unit Testing | ||
| References: | 1 2 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-2457@lists.php.net to get a copy of this message | ||
Christian Weiske wrote:
If everything worked as it was supposed to, bugs wouldn't exist. Unfortunately that isn't the case. You have to do some sort of testing to verify that everything works. What I am proposing is a more structured set of tests.Is there any value in creating a batch of unit test for the PHP-GTK 2 classes? Using a slightly modified version ofAs the gtk methods themselves should work, I don't see the need to test them.
The only thing where I see use for them is when actually bugs are discovered, and the tests help to make sure that they are really fixed. I doubt the use of 3000 unit tests that need to be created by hand for trivial methods such as GtkWindow::get_type().It is nice to know that when you make a change to GtkWindow that nothing else broke. By running the suite of tests after making a change you can be sure that get_type() still functions as it should. If you only write tests for bugs that have been found, you will always be a step behind. If you write tests first you will find the bugs before they get into production. Unit tests can also be used to drive development. Writing the test now for yet to be developed methods makes sure that what you write works the way it should. It reduces the number of bugs that make it to the end user. -- Scott Mattocks http://www.crisscott.com