Re: Re: [PEPr] +1 for Web Services::Services_Delicious
| From: | Greg Beaver | Date: | Tue, 16 Nov 2004 22:51:27 +0000 |
| Subject: | Re: Re: [PEPr] +1 for Web Services::Services_Delicious | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34422@lists.php.net to get a copy of this message | ||
Stephan Schmidt wrote:
Hi, Christian Weiske wrote:Mock objects can be used to easily simulate any input that the thing can provide - as long as it is designed to allow plugging them in. For examples, see the unit tests for PEAR - they literally simulate PEARweb as well as downloading files, so that error conditions can be tested as well. But having said this...So leave the fields for username and password blank. If anyone wants to use the package and it doesn't work, he has the *chance* to test it - if he uses it is a different question.There are times, when the service is responding with in internal server error due to a very high load. How should unit tests cope with that.
While I agree, that unit tests are a good thing, they are not suited for every package. We have rules, that they should be included in stable releases, but how do you test against a moving target. The tests are supposed to test the package, but it would be more like testing whether the service still responds the same way it did yesterday.... I agree - as long as a package remains alpha or less stable, unit tests don't make much sense. When things calm down, they become feasible - it's an incredible amount of work to do tests, but much more to *re-do* tests.
There are plans to provide different versions of the service using different URLs. If this is available, it will make sense. Otherwise, it would be like testing wether 1+1 equals 2 while somebody is changing the law of mathematics....1+1 = 6 votes in Florida, but sometimes 1+1 = -6 votes. I'd love to see regression tests for that system. :) Greg