Executing PhpUnit test in Vagrant vm

Hello

I'm developing on Windows, but my server (Ubuntu configured by Vagrant)  is on virtual machine with project files shared beetween host and guest. I can't figure out how to remotely run my PhpUnit tests.

Is it even possible? If yes, can somebody provide step-by-step instructions how to do this?

SSH user is vagrant@localhost on port 2222 without password (only Putty key).

Guests' Apache is forwarded to hosts' localhost:8080

4 comments
Comment actions Permalink

Alan,

Running phpunit tests remotely supported via 'PHPUnit on Server' run configuration. This run configuration requires setting up 'Deployment' for your server.
Please let me know if you need more information about this run configuration type.

Thank you for feedback!
0
Comment actions Permalink

This run configuration requires setting up 'Deployment' for your server.


But doesn't deployments server requires to upload project files everytime I change something? My projects are shared and I would like to stay that way :(
0
Comment actions Permalink

Alan,

There is a workaround for that - try to use 'Local' deployment type. This kind of deployment doesn't perform any synchronization.

Thank you for feedback!

0
Comment actions Permalink

I have been trying to do the same thing, and have spent countless hours attempting to figure it out.  I am using ZF-Boilerplate project with Vagrant and Lucid32 box in VirtualBox on a Win7 machine.  I want to set up the ability to just install PHPStorm and the source code on the host, and run everything else through the virtual box.  The entire configuration is vanilla from zf-boilerplate.com, aside from changing to bridged networking instead of NAT.

I have struggled trying to figure out which wizard scenario to use when even creating the base project in PHPStorm.  For this scenario, should I use the Web Server is on remote host, files are accessible via FTP/SFTP?  I can see the files in SFTP, but again, don't want to "deploy" them as they actually exist on my host machine, and are on the server through a shared folder.

Further confusing the matter is vagrant/virtualbox set this up so localhost:8080 points to the 'public' folder in my code base, so through that I don't have access to tests or any of the other project files from the host.  The only way I could ever see them all is by SFTP'ing into the VM.

I tried this option once, and it wanted to repull down the files to even set up the project.

So, my questions are threefold.  
1) Which wizard scenario should I use to set up the project from existing sources?  

2) It sounds like I need to go the SFTP route to even get PHPUnit on Server working, so is the answer to #1 what will get that on the right path?  and

3) I have spent almost 20 hours trying to get remote debugging working, and a connection is never made back to PHPStorm, even if port 9000 is listening via NetStat and I click the listen button.

Any help would be greatly appreciated.

0

Please sign in to leave a comment.