2017 © Pedro Peláez
 

library nb-remote-phpunit

Execute PHPUnit tests over ssh using NetBeans

image

foogile/nb-remote-phpunit

Execute PHPUnit tests over ssh using NetBeans

  • Tuesday, September 20, 2016
  • by stianlik
  • Repository
  • 1 Watchers
  • 1 Stars
  • 77 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

NetBeans remote PHPUnit runner

Custom PHPUnit script that enables NetBeans to run tests on a remote host. Mainly developed to make Vagrant environments more convenient to work with, but it can easily be extended to communicate with other remote hosts., (*1)

Installation

The package should be installed using composer:, (*2)

compose require foogile/nb-remote-phpunit

Subsequent sections desribe more specific installations., (*3)

Vagrant

Default Vagrant test scripts can be installed using the following commands:, (*4)

vagrant ssh;
cd /vagrant
compose require foogile/nb-remote-phpunit

Other

See "Custom test runner"., (*5)

Usage

Activate remote execution in NetBeans 8 as follows:, (*6)

  1. Right click your project and click "Properties"
  2. Navigate to "Testing" > "PHPUnit"
  3. Check "Use Custom PHPUnit Script" and point "PHPUnit Script" to VAGRANT_PATH/vendor/foogile/nb-remote-phpunit/netbeans/phpunit-vagrant.php, where VAGRANT_PATH is an absolute path to your vagrant folder.
  4. Run tests as you would normally do

Custom test runner

You can run tests on custom remote hosts by implementing a custom remote host and providing a custom NetBeans PHPUnit script., (*7)

For example:, (*8)

class SSHRemoteHost implements RemoteHostInterface
{
    public public put($localPath, $remotePath)
    {
        exec("scp $src myhost.com:$dst");
    }

    public function get($remotePath, $localpath)
    {
        exec("scp myhost.com:$remotePath $localPath");
    }

    public function delete($remotePath)
    {
        exec("ssh myhost.com 'rm $remotePath'");
    }

    public function exec($command)
    {
        exec("ssh myhost.com '$command'");
    }

See netbeans/phpunit-vagrant.php for an example of a custom NetBeans PHPUnit script., (*9)

Pull requests are welcome :), (*10)

Credits

Based on the blog post Running PHPUnit tests on a VM, from NetBeans., (*11)

The Versions

20/09 2016

dev-master

9999999-dev

Execute PHPUnit tests over ssh using NetBeans

  Sources   Download

GPL-3.0

The Requires

 

by Stian Liknes

phpunit remote vagrant netbeans

19/04 2015

v0.0.2

0.0.2.0

Execute PHPUnit tests over ssh using NetBeans

  Sources   Download

GPL-3.0

The Requires

 

by Stian Liknes

phpunit remote vagrant netbeans

19/04 2015

v0.0.1

0.0.1.0

Execute PHPUnit tests over ssh using NetBeans

  Sources   Download

GPL-3.0

The Requires

 

by Stian Liknes