GithubHelp home page GithubHelp logo

phpautotest's Introduction

PHPAutotest

This application monitors your tests and executes them whenever you make any changes to them.

It currently supports the main three TDD/BDD frameworks for PHP: PHPUnit, PHPSpec and Behat

##Framework requirements:

PHPUnit

(copied from: http://www.phpunit.de/manual/3.0/en/installation.html)

$ sudo pear channel-discover pear.phpunit.de
$ sudo pear channel-discover pear.symfony.com
$ sudo pear install -a phpunit/PHPUnit

PHPSpec

(copied from: http://www.phpspec.net/download/)

$ sudo pear channel-discover pear.phpspec.net
$ sudo pear channel-discover pear.symfony.com
$ sudo pear install -a phpspec/PHPSpec

Behat

(copied from: http://docs.behat.org/quick_intro.html)

$ sudo pear channel-discover pear.behat.org
$ sudo pear channel-discover pear.symfony.com
$ sudo pear install behat/behat

##Other requirements:

PHPAutotest requires bash shell.

Linux/Gnome

You'll need to have the notification services installed on your machine

$ sudo apt-get install libnotify-bin

KDE

Not yet implemented

OSX

Not yet implemented

##Instructions:

  1. You can download the phar file here: https://github.com/downloads/Programania/PHPAutotest/autotest.phar

You can also clone this repository and compile the PHAR file yourself:

$ ./compile
  1. Once you have your PHAR file, copy it somewhere in your filesystem and give it execution permissions
  2. Then add it to your path or simply make a link into your bin directory

Warning: Take into account that you won't be able to execute the PHAR file from the project's root directory, as everything will be duplicated inside and outside the PHAR archive.

##Usage:

If you use standard filename formats for your tests (*Test.php, *Spec.php or .feature), you can let PHPAutotest to detect the framework for you:

$ ./autotest.phar demo/PHPUnit/SomeClassTests.php

If you prefer, you can specify the framework adding an argument to the command:

$ ./autotest.phar phpunit demo/PHPUnit/SomeClassTests.php

PHPAutotest will execute your tests, idle for 1 second and check if the file has been modified. You can also hit 'r' key to force an execution.

Also, you can hide the terminal because it will notify you with the results of the test.

phpautotest's People

Contributors

cordoval avatar joseraya avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

muteor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.