Version without PHPunit?

thread: 7 messages  |  last: a year ago  |  started: wednesday, june 16, 2010, 12:18 pm pdt


#1  |  Mischa Kroon (Holland) Netherlands (Holland, Europe)
Wednesday, June 16, 2010, 12:18 PM PDT

Will future versions always have PHPUnit included or will there be a version with and without PHPUnit?

#2  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Wednesday, June 16, 2010, 9:19 PM PDT

There will not be two different versions.  All Qcodo releases from now on will include PHPunit.  Since there aren't really any drawbacks for including PHPunit, and since we have decided on PHPUnit as the testing framework for Qcodo from this point forward, there really isn't a reason not to include it.

#3  |  FredT34 (Beziers, France) France
Thursday, June 17, 2010, 1:42 AM PDT

I'm really new to this PHPunit thing. Can someone please provide links about How to use it, or perhaps an example?

TIA !

#4  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Thursday, June 17, 2010, 9:37 AM PDT

There's always http://www.phpunit.de/ for information about PHPUnit specifically.  Sebastian has a very nice document/manual he's written in PDF that goes through all the guts of the framework.

If you're asking about unit testing practices in general, there are more than a few books out in the market that talk about testing methodologies as practices.  It's a good recommendation to read through at least a little of these books to get an understanding of the values of unit testing.

#5  |  FredT34 (Beziers, France) France
Friday, June 18, 2010, 5:35 AM PDT

Thanks, Mike. I already gave it a look when I saw you were plugging phpunit in QCodo, and just reread it right now.

I just can't figure out how usefull test-systems are when the result comes out of a complex combination (the application is role-based, users can have multiple roles which add together to give them rights on the application, and of course there are exceptions and exceptions to exceptions), this result being rendered on a display (for instance, the “Edit” button will appear or won't, according to user's roles). And the permissions also come out of the workflow and the “document's status”. So I'd say we have 20 users with different roles and rights, and 20 different “documents” to test for 10 possible actions - not exactly 4000 combinations, but tens of them for sure.

So apart login in with each user profile, and test if he gets this or that button in each of the tens of document's combinations... I can't see how this can be described or enumerated - which I think has to be done before testing begins.

I apologize because this question is beyond strictly QCodo - but I'd appreciate if one of you guys could show me where I'm missing the point.

#6  |  Mischa Kroon (Holland) Netherlands (Holland, Europe)
Friday, June 18, 2010, 11:08 AM PDT

Fred unit testing isn't about testing if a button appears or not it's usually to test if functions return a specific value given a certain set of parameters.

-

To check if buttons are present when logging into a system there is another type of test, namely functional tests.

More information:
http://www.ibm.com/developerworks/library/j-test.html

Cucumber is an example of a functional test tool:
http://cukes.info/

So is Watir / Watin

#7  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Thursday, July 15, 2010, 10:27 PM PDT

Another one to check out is selenium.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.