PHPNW Test Fest Pre-presentation
Upcoming SlideShare
Loading in...5
×
 

PHPNW Test Fest Pre-presentation

on

  • 1,922 views

Slides from May's PHPNW meet. Some PHP community news plus information about Test Fest, what it is and how to get set up for it

Slides from May's PHPNW meet. Some PHP community news plus information about Test Fest, what it is and how to get set up for it

Statistics

Views

Total Views
1,922
Views on SlideShare
1,920
Embed Views
2

Actions

Likes
0
Downloads
12
Comments
0

1 Embed 2

http://www.linkedin.com 2

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

PHPNW Test Fest Pre-presentation PHPNW Test Fest Pre-presentation Presentation Transcript

  • PHPNW May 2009
  • php|tek MTA conference Chicago 19 th to 22 nd May
  • DPC Dutch PHP Conference 11 th to 13 th June Amsterdam (all in English)
  • ZendCon CfP ZendCon Call for Papers Open til 31 st May Conference: San Jose, CA 19 th to 22 nd October
  • ZF 1.8 Zend Framework new version
  • Test Fest Newton Building Salford University Saturday 9 th May 2009 12 - 4 pm
  • When/Where/Who
    • Salford University
    • Newton Building
    • (get the train to Salford Crescent)
    • Saturday, 9 th May 2009
    • YOU!!
  • Testing PHP
    • PHP uses phpt tests, a type of unit test
    --TEST-- Hello world test --FILE-- <?php echo &quot;Hello&quot;; ?> --CLEAN-- --EXPECT-- Hello
  • Getting Set Up
    • Download a VM
    • Set up your own system
  • Requirements
    • PHP 5.3 code from http://snaps.php.net
    • Build Environment (see later)
    • Text Editor
    • SVN Client
    • PHP coding ability
    • Enthusiasm
  • Build Environment
    • Packages (for my system)
      • php
      • build-essential
      • libxml2-dev
      • lcov
    • For your system – RTFM until you can successfully run &quot;make test&quot;
  • Running Tests
    • Unzip your PHP source
    • ./configure
    • make
    • make test
    • If you get to here, you're all set :)
  • Running One or Few Tests
    • make test TESTS=/path/to/testfile.phpt
    • make test TESTS=/path/to/tests
    • Or use the run-tests.php script itself
    • export TEST_PHP_EXECUTABLE=<path to php source>/sapi/cli/php
    • $TEST_PHP_EXECUTABLE <path to php source>/run-tests.php tests/ext/spl/
  • Generating Coverage Report
    • make lcov
      • optionally with TESTS= just like make test
    • look for the directory lcov_html
    • open index.php in web browser
  • Coverage Report
  • SPL
    • Standard PHP Library
    • A set of standard interfaces for common problems
    • Many different kinds of iterator
    • Presentation at TestFest about the extension
  • Why Should I Bother?
    • Learn about compiling and testing PHP
    • Raffle for elephpants
    • May get a test accepted
    • We're going for beer afterwards
  • Test Fest Newton Building Salford University Saturday 9 th May 2009 12 - 4 pm