On Mon, Sep 7, 2009 at 11:53 PM, Richard
> I'm trying to install simpletest_1.0.1.eclipse_0.2.5 into Eclipse.
> My Eclipse installation details window says in summary:
> Eclipse IDE for PHP Developers 220.127.116.1190618-0925
> Eclipse Platform 3.5.0.I20090611-1540
> Eclipse Platform 3.5.0.v20090611a
> PHP Development Tools (PDT) 2.1.0.v20090611-0930
> Simpletest plug-in 0.2.5
> Is the plugin just not compatible with this version of Eclipse?
> Or have I missed something?
I just tried installing the Simpletest plugin into Eclipse 3.5 and
something is not right (if you go to the Simpletest preference page it
fails to load -- or at least in my current configuration -- I suspect
there is some missing dependency not being loaded or missing)
All that being said, there is a much simpler (and more productive --
because it allows you to debug) way to run Simpletest in Eclipse.
I wrote the plugin and have maintained compatibility with Eclipse
through many iterations; however I think the plugin has outlived it
usefulness (or rather the toolset can now more easily provide the
To easily run Simpletest in Eclipse:
Download the latest tgz from the website (1.0.1) and extract somewhere
In Eclipse create a new project:
File -> New -> Project...
Expand "General" and select "Project"
enter a name for the project ("Test"?) and press "Finish"
Right click on the project created and select "New File"
enter a file name ("simple_test.php"?)
copy the folder ("simpletest") you extracted above into the project you
The project tree should look like:
If you expand the simpletest folder you should have three folders
underneath it (docs, extensions, test - the folders are not important,
I mention them to make sure that you have not unnecessarily included
too many folders above the simpletest folder) and all the simpletest
now you need to setup php in Eclipse:
Window -> Preferences
Select "PHP Executables"
Add a valid PHP executable [I won't go into details here because it varies]
Press the "OK" button to close the preferences window
Create a basic test:
Open the "simple_test.php" file we created earlier in a text editor
assertEqual("a","b","This should generate an error");
$this->assertEqual("a","a","This should pass");
Save the file and then right click and select "Run As" -> "PHP Script"
If you look at a "Console" view [it should open automatically] the
output should be:
1) This should generate an error at
[C:\eclipse-3.5\workspace\Test\simple_test.php line 6]
Test cases run: 1/1, Passes: 1, Failures: 1, Exceptions: 0
Or something similar
If you get the PHP debugger setup correctly (in Eclipse) in becomes
easy to right click and "Debug As" -> "PHP Script"
I hope this helps.
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july