It is a very common situation that your IDE runs on a windows system while your software should be tested on a unix system too. Sure you can have a Run Configuration to sync the files, and you can run the remote php script if it is a webpage / webapplication - but if it is a cli script you can not run it via your IDE (netbeans). You have to copy it via a run configuration and then run via a shell client (like putty). Workflow interrupted (!).
The same is if you run your IDE on unix / mac but want to test your code on a windows system, too.
Remote script excecution can be done by this proposal: http://netbeans.org/bugzilla/show_bug.cgi?id=195817.
If you want to do unit tests on the remote system initiating via IDE you can change your phpunit.bat / phpunit.sh to make remote calls and get remote files (see above proposal). But the phpunit script path can not configured at project level at the moment (Tools / Options / PHP / Unit Testing).
Please add a "PHPUnit Remote" category to the "Project Properties" dialog.
As long as this category is not filled out (or enabled by the user) the defaults from Tools / Options / PHP / Unit Testing should be used (as normal). Else a separate phpunit.bat (i can provide it; a batch that does the remote stuff) should be used.
On the "PHPUnit Remote" category you should place some form fields and that fields should be passed to the batch as params.
- SSH Client Path (local) with browse button (e.g. plink.exe - Putty)
- SSH Client Arguments (username, password, host)
- SCP/FTP/SFTP Client Path (local) with browse button (e.g. pscp.exe - Putty)
- SCP/FTP/SFTP Client Arguments (username, password, host)
- PHP Interpreter Path (local) with browse button
- PHP Interpreter Path (remote)
From this point you will have a remote unit testing at project level - in a later enhancement you should be able to have as many remote unit testing setups as you have "Run Configurations" for your project.
*** Bug 251072 has been marked as a duplicate of this bug. ***
We're trying to implement Test-Driven-Development but we want to make sure the tests are run on an environment that matches the production server (i.e. if we add a feature that required Memcached we want to know that it fails on the server if php-memcached is not installed and without having to install it on all of our local machines).
I know this can be done via the command line on the remote server, but we'd like to take advantage of the features within NetBeans to manage it.
This bug is fairly old but I see there has been a few recent requests for it, it would be really nice to add this ability.