I am trying to explore the possibility of using @group
or @author
annotation on class level, so that I may assign some sort of ownership to specific people. Also, with this, I plan to macro-manage things, like: if I want one or more classes to run (in their entirety), I can just specify their groups as, say ABC and then use --groups
option.
Presently, I think @groups
or @author
is used on test case level only, and not on Test Class level. What I think is that one class may have hundreds of test cases, and writing @author
or @group
would be very tedious. And in future, if the ownership changes, we need to change the annotation attribute everywhere. Hence, is there any way to specify @group
or something like that on class level?
Yes you can use @group
on test classes. However I could not find it in the documentation so it can be something that will change. (I've checked it on PHPUnit v3.7.37)
Note: this is something that is fairly easy to try, I'd even say quicker than asking it here. Also typing "phpunit class level group annotation" into google yields a blog page about this as the first result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With