Somewhere in Dev Zone (http://framework.zend.com/wiki/display/ZFDEV/Home) I read a paragraph where developers were strongly encouraged to develop offline focused unit tests rather than tests that rely on a connection to the web service.
I had a quick look to the most part of Zend framework webservice classes and I really enjoyed Zend_Feed approach. This is why I chose to follow Zend_Feed example to develop Zend_Service_Technorati unit tests (http://framework.zend.com/svn/framework/trunk/incubator/tests/Zend/Service/Technorati/). Today I fixed a bug related to Zend_Service_Yahoo that is based on a different approach. Zend_Service_Yahoo has an offline unit test file for the most common exceptions but uses online Yahoo! API for running the main part of unit tests. The bug would never be pointed out with this approach because you don't know in advance web service response and you cannot test if data by the class matches XML response. I was wondering which is your favorite approach for web service unit tests or which one you would suggest to use. Do you create offline based scripts or do you prefer to query the end user web service? -- Simone -- View this message in context: http://www.nabble.com/Online-vs-Offline-unit-tests-tf4939193s16154.html#a14138425 Sent from the Zend Framework mailing list archive at Nabble.com.
