How run Zend Framework PHPUnit tests on remote machine?

My zf application structure (mounted folder, webserver on vmware):

application
docs
library
public <-- webserver root directory
tests <-- all tests here

When I run PHPUnit tests (PHPUnit on Server):


Testing started at 1:50 ...
Uploading test files to Setor Zend Framework...
Executing tests
Failed to retrieve test results from the server at 'http://zf.setor.net/tests/_intellij_phpunit_launcher.php'.
Cleaning up...
Empty test suite.


Temporary solution is "ln -s ../tests tests" in the public directory. But...


Executing tests
PHPUnit_Framework_Exception: Could not read "W:sitessetortestsphpunit.xml". in /usr/share/php/PHPUnit/Util/Configuration.php on line 212
Call Stack:
    0.0019     568824   1. {main}() /work/sites/setor/tests/_intellij_phpunit_launcher.php:0
    0.0461    2785236   2. MyTestRunner::main() /work/sites/setor/tests/_intellij_phpunit_launcher.php:743
    0.0473    2964884   3. PHPUnit_Util_Configuration::getInstance($filename = 'W:sitessetortestsphpunit.xml') /work/sites/setor/tests/_intellij_phpunit_launcher.php:522
Dump $_SERVER
   $_SERVER['HTTP_HOST'] = 'zf.setor.net'
   $_SERVER['SERVER_NAME'] = 'zf.setor.net'
Variables in local scope (#3):
  $filename = 'W:sitessetortestsphpunit.xml'
  $instances = *uninitialized*
  $realpath = FALSE
Cleaning up...
Empty test suite.


invalid path in _intellij_phpunit_launcher.php :( bug?

How configure webserver root directory in PhpStorm in this case?

--
EAP 102.18



Attachment(s):
phpstorm1.JPG
6 comments
Comment actions Permalink

Hi Sergei,

Can you check your Run Configuration please. In particular -- "Use XML configuration file" field.

From what I see, you have Linux-like OS on server (based on the path "/work/sites/setor/tests") but your local OS is most likely Windows (based on "W:sitessetortestsphpunit.xml").

If the above is correct then I recommend to edit the field mentioned above: instead of
W:\sites\setor\tests\phpunit.xml
put
/work/sites/setor/tests/phpunit.xml

0
Comment actions Permalink

Bazzik wrote:

From what I see, you have Linux-like OS on server (based on the path "/work/sites/setor/tests") but your local OS is most likely Windows (based on "W:sitessetortestsphpunit.xml").

All right!

Like this?
phpstorm2.JPG
Can't run.

0
Comment actions Permalink

OK, that did not worked :^O ...

One more idea -- what do you have in second screenshot -- "Remote" tab -> "Server path mappings..." ? I really unsure if this will help .. but lets try it:
Can you set up there:
Local Path on Client = W:\sites\setor\
Local Path on Server = /work/sites/setor/

Additional idea (based on info from 1st screenshot):
instead of
C:\Users\Setor\ .....\tests\phpunit.xml
put
W:\sites\setor\tests\phpunit.xml

Those just an ideas -- I have not done any remote unit testing myself so cannot guarantee anything :(

0
Comment actions Permalink

I tried all variants (all paths and mappings), but still not working. Always PHPUnit_Framework_Exception: Could not read "W:sitessetortestsphpunit.xml". in /usr/share/php/PHPUnit/Util/Configuration.php on line 212


I think, it's a PhpStorm bug
0
Comment actions Permalink

Looks like it -- I recommend reporting it on issue tracker: http://youtrack.jetbrains.net/dashboard/WI#newissue=yes

0

Please sign in to leave a comment.