After you set up PHPUnit, Web IDE greatly helps you to run your tests. Namely, to quickly create test run configuration:
- Right-click the desired target: a directory or a PHP file in the Project view, or a test class/method name in the code editor
- Choose Run<name> to start or Create<name> to specify additional parameters
That’s it!
XML configuration file
Advanced settings can be specified through PHPUnit configuration file. All the options specified in Web IDE take precedence over those set in configuration file.

Test groups
A test can be tagged as belonging to one or more groups using the @group annotation as shown below.

The test is run if none of the specified groups is excluded and at least one group is included.

Run/Debug Tests
Before you execute tests, please set up PHP home directory (one that contains PHP executable) in Settings | PHP. Debugging is currently available via XDebug. Specify the same debug port in Settings | PHP as in php.ini file (xdebug.remote_port=<port number>).

Test results window
You can easily navigate from tests results tree and stack trace to the corresponding source code location.

When debugging your tests you get all the features, such as watches, expressions evaluation, etc. You can have several debug sessions simultaneously.

All of these features will be available since next EAP.
Test with pleasure!
For up-to-date information please follow to corresponding WebStorm blog or PhpStorm blog.
Hi,
Can you provide some information about unit testing Zend Framework applications within phpstorm?
I try PHPUnit but it isn’t work with annotations @test
/**
* @test
*/
public function doSomething() {
$this->assertEquals(…);
}
message is: “No test found”
Testing started at 10:10 …
Executing tests
Empty test suite.
Does it work without annotation @test, but with method renamed to testDoSomething() ?
I’m having the same trouble, I renamed my test method like suggested and still having the same issue.
I have a bootstrap with the autoloader in the xml configuration, but phpStorm doesn’ seem to use them.
Any ideas anybody ?
Hi,
there is a way to run the unit tests using a phing target?
Thanks
Hi, Diego!
Create Phing build file with target with PHPUnit task . It can be run from editor (Run Build File context menu action), or it can be added to Phing Explorer (Add as Phing file context menu action) and later run from there.