[buddypress-trac] [BuddyPress] #3567: Unit Testing for BuddyPress!

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Sep 9 16:05:53 UTC 2011

#3567: Unit Testing for BuddyPress!
 Reporter:  foxly        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Core         |     Version:  1.5
 Severity:  major        |  Resolution:
 Keywords:  has-patch    |

Comment (by foxly):

 1 - Yes, that's why we forked PHPUnit and created PHPUnit Portable... :)

 2 - The exact implementation of the test runner is a bunch of trade-offs.
 We set it up the way we did so that it could be checked-in to a version
 control system. That way, when other developers check-out our code, they
 have a fully functional pre-configured unit test environment that's up and
 running in a matter of seconds.

 It would be quite easy to modify it to work with multiple plugins at once,
 or have a master install in the BuddyPress plugin and then have it load
 unit tests from the individual plugin directories ...but we should
 probably let it mature a bit first.

 3 - Actually, there's only one unit test in there, the other functions are
 set-up and tear-down code. In our experience its best to have only one
 unit test per file so you can just disable a given file when you want to
 run a test. Take a look at our SVN to see how we've implemented things.

 4 - I think shared unit tests are an excellent idea, especially now that
 BP 1.5 is really starting to interact with other plugins. We'd be happy to
 include your unit tests in our automata to make sure BP-Media isn't
 introducing defects via hooks, filters, or other vectors.

 5 - I just want to clarify that we're not volunteering to be the
 "BuddyPress Unit Test Team" here. We've built you the technology, but you
 guys are the ones that have to go out and use it  :)

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3567#comment:5>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list