PUWI (PHPUnit Web Interface) is a tool that provides a web interface to PHPUnit framework. This tool is intended to be executed in local environment. It's necessary to have a web server with PHP support (e.g. Apache HTTP) in order to install it. Users launch this application from their own PHP projects and web browser is immediately opened showing results for each unit test executed.

In addition, PUWI allows to:

  • Re-execute unit tests.
  • Handle results visibility (show only failed tests).
  • Revise the coverage HTML report generated

Requirements

It's necessary to have 'git' and 'curl' installed:
sudo apt-get install git
sudo apt-get install curl php5-curl

It's necessary too:
PHP >= 5.4.7
xdebug >= 2.2.1

In order to revise the coverage report, it's necessary to have 'coverage-html' as logging type in the PHPUnit configuration file and also you have to establish write permissions for the directory where the resultant files of HTML coverage analysis are going to be saved.

Installing PUWI

  1. Download the project from the URL:
    git clone https://github.com/LuciaPerez/PUWI.git
  2. cd PUWI/
  3. First of all, it's necessary to check in config.ini.inc the following locations:

    serverDirectory is the directory where php.ini file is located, in Apache server is /etc/apache2/

    pubDirectory is the location where files are published at the web server, in Apache server is /var/www

    runService indicates the location of the service which must be restarted after modifying php.ini file, in Apache server is /etc/init.d/apache2

  4. Execute the installation script: sudo ./install.bash

Running tests

To execute tests from a project using PUWI, execute puwi command in your project location. Below an example:

~/workspace$ cd MyProject
~/workspace/MyProject$ puwi
  PUWI is running on http://localhost/puwi/...
~/workspace/MyProject$ 

Browser is launched in background to show PUWI.

Collaborators

This tool was developed by Lucía Pérez as a Final Year Project, managed by Miguel Reboiro, in the School of Computer Science at University of Vigo. This project arose as an idea from Pepe Doval , Agil-AZ co-founder.