wiki:Developers/RFC/Unit-Testing

PHPEclipse IDE and Unit Testing

Overall xUnit

Our addition of Unit testing to the PHPEclipse IDE will have the following abilities.

Basic

  • Add PHPUnit to build path. This should enable content assist for PHPUnit methods.
  • Wizard to build Test Suite
  • Right Click menu context on file will have new options to build unit test file. When new file is built it should look for test suite to add it to suite file. This will be a wizard that will show you all the functions/methods in the file, you can select which ones to build tests for. Another idea i had for those that use getter setter is to merge getter/setters. What this would do is create 1 test that would check for default value of getter, set a value using the setter, then check the return value of the getter that it returns what should be expected. The wizard will only make the stub you would need to fill in the values.
  • Run Suite and have view of all tests run. Can select specific test to run alone.

Extra

If you install the extra package, you will need other Eclipse plug-ins. I foresee the extra package as the Database tools from Eclipse. This would allow you to connect to a database to help in generating the xml file used for PHPUnit DBUnit extension. This extra feature would need testing from multiple databases, to insure that we get back the data we are needing to make this work.

We would package the PHPUnit version that we support with the plug-in. Another area that we could investigate is the integration with XDebug.

PHPUnit

Create a plugin that would utilize PHPUnit testing framework. Granted SimpleTest has support for PHPUnit2, if an agreement can be reached and they are willing to work with us, we (ed_mann) could work to get it using PHPUnit3,4. If we are unable to work with SimpleTest Plug-in then we would start our own, and work from the goals outlined above.

SimpleTest

SimpleTest already have a Eclipse plug-in, i have sent an e-mail to contact the developers to learn if we can offer their plug-in with PHPEclipse. Also we would add some resources to extend it notably make sure it fits our overall desire for our Unit Testing feature.

AddComment?

Last modified 5 years ago Last modified on 2008-12-17T13:21:23-06:00