Bug 197552 - Unit Testing at a remote sytem (PHPUnit)
Unit Testing at a remote sytem (PHPUnit)
Status: NEW
Product: php
Classification: Unclassified
Component: PHPUnit
7.0.1
PC Other
: P3 with 17 votes (vote)
: TBD
Assigned To: Petr Pisl
issues@php
:
: 251072 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-07 20:12 UTC by daniela.waranie
Modified: 2015-03-30 18:45 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description daniela.waranie 2011-04-07 20:12:51 UTC
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.

Fields:
- 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.
Comment 1 Tomas Mysik 2015-03-12 10:39:37 UTC
*** Bug 251072 has been marked as a duplicate of this bug. ***
Comment 2 jdavidbakr 2015-03-30 18:45:23 UTC
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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo