tdd: desarrollo dirigido por pruebas con php, phpunit 3.5.15/ jsp, jee, junit

Post on 03-Mar-2015

167 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

PHP, PHPUnit 3.5.15/JSP, JEE, JUnit

TRANSCRIPT

Pantallas de configuración

Angel Sullon Macalupuasullom@gmail.com

Agenda

• Instalar PHPUnit (Manualmente)• Probando PHPUnit Con NetBeans 7.0.1

Configuración General

Instalacion de Xampp• Instalar “xampp-win32-1.7.4-VC6-installer.exe” dentro de la carpeta Server

D:\Development\Server\Xampp\apache\conf\httpd.conf

#Listen [::]:80Listen 1009

D:\Development\Server\Xampp\apache\conf\extra\httpd-ssl.conf

#Listen [::]:443Listen 543

Instalar PHPUnit (Manualmente)

Descargar http://pear.phpunit.de/get/PHPUnit-

3.5.15.tgz

Eliminar PHPUnit y PHPUnit2, Pegar PHPUnit-3.5.15.tgz. descomprimir

Cortar PHPUnit y pegar en D:\Development\Server\Xampp\php\PEAR

Quitar la extensión de phpunit.php. Luego cortar junto a phpunit.bat

Pegar en D:\Development\Server\Xampp\php y reemplazar ambos archivos

phpunit

#!/usr/bin/env php

Cambiar por

#!\xampp\php\.\php.exe

phpunit

if (strpos('@php_bin@', '@php_bin') === 0) { set_include_path(dirname(__FILE__) . PATH_SEPARATOR .

get_include_path());}Cambiar por if (strpos('D:\Development\Server\Xampp\php', 'D:\Development\Server\Xampp\php') === 0) { set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path());}

phpunit.batif "%PHPBIN%" == "" set PHPBIN=@php_bin@if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATHGOTO RUN:USE_PEAR_PATHset PHPBIN=%PHP_PEAR_PHP_BIN%:RUN"%PHPBIN%" "@bin_dir@\phpunit" %*

Cambiar por

"D:\Development\Server\Xampp\php\.\php.exe" "D:\Development\Server\Xampp\php\.\phpunit" %*

D:\Development\Server\Xampp\php\php.ini

[XDebug]zend_extension = "D:\Development\Server\Xampp\php\ext\php_xdebug.dll“

xdebug.collect_includes = 1

Comprobando pear installed

Phpunit falta PEAR PHP

Desargar archivos PEAR PHP. Estos archivos pueden desargarse del plugin para eclipse

http://www.phpsrc.org/eclipse/pti/

Ó de http://www.assembla.com/code/pti/subversion/nodes/libraries/pear/PEAR/PHP?rev=764

Phpunit falta PEAR File

Desargar archivos PEAR PHP. Estos archivos pueden desargarse del plugin para eclipse

http://www.phpsrc.org/eclipse/pti/

Ó de http://www.assembla.com/code/pti/subversion/nodes/libraries/pear/PEAR/PHP?rev=764

Comprobando phpunit installed

Probando PHPUnit Con NetBeans 7.0.1

PhpUnitario1 Project

Ir a Tools>Option>PHP

Add PHP Class y Generar Test

Desargar archivos PEAR Text. Estos archivos pueden desargarse del plugin para eclipse

http://www.phpsrc.org/eclipse/pti/

Ó de http://www.assembla.com/code/pti/subversion/nodes/libraries/pear/PEAR/PHP?rev=764

SumaTest generate

Run test

Coverage Report

Clic Report button

Report Coverage

100% tested coverage

top related