Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PEAR-QA] Re: Testing
Greg Beaver wrote:

> this division is not accurate.  I would put it
>
> 1) PHPUnit and Simpletest can only be used to test classes and functions

I agree, no public method should be released without couple unit testing

> 2) .phpt can be used to test anything that PHP can be used for.

What I like too. This way coding the test enable any test you like to do
and repeat.
 
>
> Some packages simply can't be easily regression-tested by all users.

Could never be required

>   Generally, apps that absolutely require complex external interfaces
> like DB or MDB will always require some external setup by the tester.
> Packages like Net_Curl, for instance, require that an external server
> be set up over the internet -

Indeed they need to be tired and hazarded.

> it's literally impossible to test its functionality without this step.

Again, I'm ok, better shock your app on your own
 
>
>
> I agree with the "I aim" part, but have no idea what you are talking
> about in the rest of the paragraph, could you rephrase?

Let have a script.php, requiring some variables, say in $_POST
for this script.php,
I can build some real value tests unit or whole apps  with PHPUnit and
Simpletest
But I need to build it.
I would like to turn a key as I am testing this script.php (perhaps then
over HTTP)
what would then record the testing (recording the $_POST in the session)
Someway, somehow that recording will stop
I like to have this record generating me some PHPUnit or .phpt scripts
So puting the $_POST recorded as php script initializing variables.
 
>
> again, what are you trying to say?

A lot is server/client what is all cases server/clientS and at most
serverS/clientS
PHPUnit and .phpt have no 'S' and no 'S''S' (one to one)
It's due to test with, let say, "overcrossing clients"...
then best simulate less or more stochastic requests
When testing a pckg, some third party exists, what pear not necessarly
controls,
but interaction is dynamic, so we need to test it (so as no control from
pear, simulate)
 
>
> Are you talking about mock objects?  If you want to use mock objects,
> it's no harder to do this with PHPUnit2, Simpletest, or simply by
> writing them yourself.  I wrote several mock objects for PEAR's unit
> tests, including an object that literally simulates the entire PEARweb
> without using the internet.  It didn't take long, but it did take work.
>
> Greg
>
Sure these mock objects are good to use.
But they transform the script, don't they?
Where is the definition for mock objects, or some examples ?
From my point of view, simulation should come from outer,
as far as possible script not knowing it's simulation.
Ã_+
bertrand Gugger (toggg)

Report this thread to moderator Post Follow-up to this message
Old Post
Bertrand Gugger
11-23-04 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP PEAR Questions and Answers archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:19 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.