[ciapug] Resources from last night's talk

Tony Bibbs tony at tonybibbs.com
Wed Oct 3 10:44:24 CDT 2007


Our testing methodology consists of:

1) a test plan.  It defines the scope of testing (which will and will not be tested), how to test (tools, etc) and when to test (e.g. automated, manual).
2) Unit tests - we use PHPUnit...remember  our organization supports .net, PHP and Java and all have the *Unit test suite, they all work the same and they all have pretty much the same class names even.  
3) Manual test, let's face it, you can't use PHPUnit for everything.  For manual tests defined in the test plan it's nothing more than a script of steps that tell the test how to: a) setup the test scenario b) run the test c) record results of the test d) tear down the test (if needed).

I'd say our testing methodology is in it's pre-teen stage...we are still not particularly great at testing but hopefully it sets the stage for how you can integrate it into your environment.

At our next meeting I'd have no problem demonstrating real tests using PHPUnit, show examples of our test plans and test scripts and talk about other tools like JMeter and Bad Boy.  Which reminds me of two more resources:

JMeter: http://jakarta.apache.org/jmeter/
Bad Boy: http://www.badboy.com.au/

--Tony

----- Original Message ----
From: Eric Junker <eric at eric.nu>
To: Central Iowa PHP Users Group <ciapug at cialug.org>
Sent: Wednesday, October 3, 2007 10:16:24 AM
Subject: Re: [ciapug] Resources from last night's talk

Matthew Nuzum wrote:
> found. I've just not been able to grasp how to go from the "hello
> world" of testing to building it into my application. Especially web
> applications, since there's little mention of unit testing for the
> web.

I believe several PHP frameworks include a unit testing framework. For 
example, Symfony has one called lime. Other popular unit test frameworks 
for PHP are: PhpUnit and Simpletest. I used SimpleTest on my last 
project and found it very useful. For every bug I found I wrote a unit 
test to make sure I never had that bug again. Unit testing also allows 
you to refactor and be confident that you didn't break anything.

For unit testing an MVC app I think the most important thing to test is 
the models. Some say that a true unit test should not touch the database 
so they use test fixtures or mock objects to decouple the test from the 
database.

Eric
_______________________________________________
ciapug mailing list
ciapug at cialug.org
http://cialug.org/mailman/listinfo/ciapug





More information about the ciapug mailing list