New unit testing framework?
Moderator: General Moderators
New unit testing framework?
Does anybody know if a newer testing framework than PHPUnit / simpletest is being developedor has been developed? I mean, these work fine, but they just seem out-dated and neither have the most ideal interface. I'm a little surprised these two libraries are the best PHP has to offer. Don't get me wrong, I love simpletest, but I'm just convinced it could be done much better.
Re: New unit testing framework?
Maugrim was working on PHPSpec, I don't know how far along it came.
Re: New unit testing framework?
It looks like the last release was in January though 
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: New unit testing framework?
It looks like SimpleTest is not in very active development. The last release was 8 Apr 2008. There is a Contribute Page for a 1.1 release, but it's been almost 9 months since the 1.0.1 release. Perhaps you could contact Marcus Baker, Perrick Penet or Travis Swicegood to see if they are looking for someone to pick-up development. I know Chris Corbyn contacted them when he started his YayMock project. Perhaps Chris has more info on contributing.
(#10850)
Re: New unit testing framework?
I wish I understood the problem well enough to write my own, but I'm still just trying to learn how to unit test my code, there's no way I could write a unit test framework. 
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: New unit testing framework?
SimpleTest is in active development I can assure you that
1.1 beta is due out shortly.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: New unit testing framework?
Any of your YayMock ideas or other goodies make it in that you'd care to share?
(#10850)
Re: New unit testing framework?
Oh yay! 
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: New unit testing framework?
I have to admit, I haven't really had any time to devote to it since being added to the developers list. I'll contribute eventually though. I do read all the developer emails so have an idea of what's going on though.arborint wrote:Any of your YayMock ideas or other goodies make it in that you'd care to share?
I am still chipping away at Yay mock behind the scenes though since it's used throughout the Swift Mailer unit tests (as you know)
EDIT | Too much red wine and festivities... how many times can you say "though" in a forum post though?
Re: New unit testing framework?
Actually I haven't looked at Yay! Mock in quite some time. I think using it along with simpletest may actually alleviate a lot of the short-comings of simpletest. I don't fully understand how it works yet, but I will play around with it.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: New unit testing framework?
I haven't pushed any changes live for while so there's not much to see online. I thought it was wise to get iron out the annoyances (not bugs, just long-winded-ness) before promoting it heavily. There are little things that bug me about the interface that are easily resolved. For example, why this:The Ninja Space Goat wrote:Actually I haven't looked at Yay! Mock in quite some time. I think using it along with simpletest may actually alleviate a lot of the short-comings of simpletest. I don't fully understand how it works yet, but I will play around with it.
Code: Select all
$context->checking(Expectations::create()
-> one($mockA)->someMethod($arg1, any(), optional())
-> exactly(3)->of($mockB)->otherMethod()
);Code: Select all
$context->checking()
-> one($mockA)->someMethod($arg1, '*', '?')
-> exactly(3)->of($mockB)->otherMethod()
;
Re: New unit testing framework?
I was actually wondering the same thing. I haven't done much Java development, but I do kind of know what you mean. I have ported a few things from python, and sometimes the interface just doesn't make sense in PHP.
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: New unit testing framework?
We (as in Marcus and Perrick) are currently working on getting the documentation up to speed with the latest release, after which 1.1beta will be released (and in SimpleTest tradition, be as stable as betas come.)
Ninja, I'm curious to know what you find "out-of-date" with SimpleTest and PHPUnit.
Ninja, I'm curious to know what you find "out-of-date" with SimpleTest and PHPUnit.
Re: New unit testing framework?
Hmm... I was under the impression that simpletest didn't get that much attention but I guess that's not the case.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: New unit testing framework?
I think Mocks and Specs are two areas were a number of projects have moved past SimpleTest in thinking about how tools can support TDD. My impression of those projects was that they were built because the person couldn't get SimpleTest to do what they wanted it to do.Ambush Commander wrote: I'm curious to know what you find "out-of-date" with SimpleTest and PHPUnit.
(#10850)