windows: phpunit via ssh on remote: how ?
hi all,
i am not able to make phpunit remote via ssh working.
my setup:
- phpstorm 9 (latest): windows
- linux
- local path: B:\projects\tests\1\ (mounted via samba to widows)
- remote path: /home/project/1/
- setup remote php interpreter
- setup a default deployment server with path mappings (and set as default)
i am not able to follow this tutorial: https://confluence.jetbrains.com/display/PhpStorm/Running+PHPUnit+tests+over+SSH+on+a+remote+server+with+PhpStorm
when i start my test, is get this:
ssh://root@127.0.0.5:22/usr/bin/php /root/.phpstorm_helpers/phpunit.php --bootstrap /home/project/1/tests/bootstrap.php --no-configuration B:\projects\1\tests
but correct would be
ssh://root@127.0.0.5:22/usr/bin/php vendor/bin/phpunit --bootstrap tests/bootstrap.php --no-configuration tests\
and of course i get this error, because paths are wroing:
bash: Zeile 0: cd: B:/projects/1: No such file or directory
so my main problems:
- how to tell phpstorm, not using .phpstorm_helpers ?
- how to tell phpstorm to use correct path mappings, even i don´t use a deployment server (because folders are mounted via samba into my windows)
- how to use relative paths instead of absolute ? (don´t know if that is a problem)
thanks for any help !
Please sign in to leave a comment.
Hi there,
You cannot do that -- IDE needs it for integration purposes. IDE never calls actual phpunit executable directly -- it instantiates PHPUnit classes and uses them inside helper script.
Not sure if it's possible -- IDE needs to know how to translate local path to remote, right? Deployment is the one (most reliable) way of providing such info.
That's not a problem here (as long as IDE can properly translate local path to remote)
----
Not sure about your particular setup (why it does not work and what exactly needs to be done to make it work) .. but this is what I have been suggesting for users instead (as alternative) and it works:
hi,
thanks for your fast feedback !
so inspired by your post, i did the following:
- delete all deployment servers
- delete all phpunit-settings
- create new deployment server
- create new phpunit-config based on remote parameter related to the new deployment server
- changed "Path to phpunit.phar" to "Use custom autoloader" (because i am using composer)
this did the trick.
phpstorm is unable to recognize a phpunit remote config if the deployment server is created AFTER the phpunit config.
i´m afraid, phpstorm seems unable to bind a deploy-server to a phpunit-config, after the phpunit-config has been created ;(
this produced a lot confusen here ;(
so after all, it´s working ;) but for everybody: take care of the order of the setup !