How to configure Netbeans to work with PHPUnit in a virtualized environment?

4

I use Netbeans 7.4 on Mac to program. And to not have to install PHP and PHPUnit, I would like to run PHPUnit installed on a virtual machine that has an entire integration environment already configured. This practice has been heavily used, and is displayed on sites like PHP The Right Way .

To use PHPUnit integrated with Netbeans, you must specify a file that will be used to execute the PHPUnit commands, which can be the PHPUnit executable itself or a script. To indicate the file, it must be on the same machine where Netbeans is installed so that it can access it.

So, how do I configure Netbeans to run PHPUnit that is installed on the virtual machine?

Searching, I found some tutorials that show scripts that run PHPUnit on the virtual machine using SSH or the Virtual Box virtual machine control tool.

This would seem to work, but it is for Windows and needs specific path of a test folder. I have several projects in Netbeans, if I fix a test folder in this script, I could use PHPUnit for just one project.

Another problem I have when creating a script for Netbeans to run PHPUnit is that the local paths are different from the virtualized server. I found other solutions using SSH, but the SSH connection requires a password, which makes it difficult to use the SSH command.

The development environment

  • MacBook with Mavericks OS X 10.9.1
  • Virtualized server in Virtual Box 4.3.6 with Ubuntu Server 12 using Bridge Adapter
  • Apache, PHP and MySQL, XDebug, PHPUnit and other continuous integration tools installed on the virtualized server
  • The "/ Sites" folder is shared with the virtual machine and mounted on "/ var / www". This is what I change in the "~ / Sites" folder and the changes are available for the virtual machine to run.
asked by anonymous 31.01.2014 / 03:18

1 answer

2

You need to configure the phpunit-remote.sh and network / network of the virtual machine well.

Is the virtual machine network in NAT or Bridge Adapter?

I recommend using Bridged Adapter for the machine to have its own ip within the network.

Next is to know the machine ip on the network with ifconfig

And set up in the file .sh

[email protected]

I do not know.

    
31.01.2014 / 04:51