Make netbeans use phpunit guest install virtual box

We use netbean phpunit / unit plugins for all our tests. We used xampp and point netbeans in our .bat file from xampp installation. We recently started using Vagrant and are now running our developer environment in a virtual box. I want netbeans to use phpunit installation in a VM. This saves us from having to install both. Is it possible? Netbeans seems to want to find the file and I am focused on how I can do this.

[EDIT] I created a custom batch file that uses vcc guestconrols to redirect commands to VM phpunit install. I'm going to then specify netbeans in my regular .bat file. My problem is that guestcontrols doesn't seem to forward -bootstrap. He seems to be trying to take it and use it, not push it forward. The docs say that all additional arguments will just be passed, but that doesn't seem to be the case. This is what I am using in my_phpunit.bat:

[my_phpunit.bat]

@echo off

if "%VBoxManage%" == "" set VBoxManage=C:\Program Files\Oracle\VirtualBox\VBoxManage.exe

"%VBoxManage%" "--nologo" "guestcontrol" "<my_vm_name>" "execute" "--image" "/usr/bin/php5" "/usr/bin/phpunit" "--verbose" "--username" "<user>" "--password" "<pass>" "--wait-stdout" "--wait-stderr" "CustomNetbeansTestSuite" "<path/to/test/suite>" "--bootstrap" "<path/to/bootstrap>" %7

      

I'm almost there, as running the bat file without the bootstrap option at the end brings me to a unit test. I am getting exceptions due to some autoloader issues (no loading), but if I can find a better way to redirect these command line arguments to

[EDIT 2] I think I finally solved this, but I need to get some problems with my guest OS in order. As soon as I can test it a little more, I'll post the final solution. I solved the Vbox guest issue by adding "-" before I actually sent the parameters to be forwarded. He said to do it in the documents, but at first it was not entirely clear.

+3


source to share


1 answer


I just wanted to update that I never got the .bat file to work. I think I got pretty close, but got hung up on some Linux CLI output that I couldn't suppress. The .bat file I ended up with was:

# .bat example
https://pastebin.com/BX1xnL3q

      



I got over to PhpStorm and it worked out of the box. So, if you are still using netbeans, you can try and do it. Perhaps someone with more unix / linux experience can solve the problems I am having. I feel like I've been there since 99%.

0


source







All Articles