SimpleTest annotations

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

SimpleTest annotations

Post by alex.barylski »

Is this possible in SimpleTest? How?

I've searched Google, etc for a way to prefix test methods with 'should' instead of 'test' and have not found any way to accomplish this, so short of poking through the SimpleTest code...I figured I'd ask here as I thought this would be a popular topic but apparently not...according to Google anyways. :P
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I'm curious if this is possible too. JUnit allows the use of Annotations to do things like this. In PHP it would be a little less readable however since there are no annotations although Reflection does allow Doc comments to be read in PHP5.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Chris Corbyn wrote:I'm curious if this is possible too. JUnit allows the use of Annotations to do things like this. In PHP it would be a little less readable however since there are no annotations although Reflection does allow Doc comments to be read in PHP5.
I had to Google annotations because you confused me with that last sentance...

All I am interested in doing (for now) is having 'should' prefix instead of 'test' which I figured would be a simple call to the SimpleTest class...but I can't find anything...so short of going into the source and finding where the unit tests are invoked and replacing 'test' with 'should' - I'm lost... :)
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Some form of annotation support (I think maybe grouping though) was discussed a few weeks ago on the SimpleTest mailing list but the ST team have slightly larger fish to fry first I think (like migrating to Subversion and PHP5).
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Slightly off topic but related to ST...

While reading the PHPUnit docs I encountered that code coverage analysis application...very neat...can I use something similar in SimpleTest? I assume it's a PHP extension?
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

I don't believe it applies yet - code coverage for PHPUnit is in any case run primarily by the xdebug extension. Adding support for that to SimpleTest would be a relatively simple task I'd think. Chance are SimpleTest will have Mutation Support in about a month also - something I'm working on in bits and pieces.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Maugrim_The_Reaper wrote:I don't believe it applies yet - code coverage for PHPUnit is in any case run primarily by the xdebug extension. Adding support for that to SimpleTest would be a relatively simple task I'd think. Chance are SimpleTest will have Mutation Support in about a month also - something I'm working on in bits and pieces.
And by mutation support, you mean???
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Post Reply