====== PHP TestFest 2010 ====== //This page contains out-dated material and is archived here for informational purposes. For recent information, see the [[qa:testfest| main PHP TestFest page]].// ===== What is TestFest? ===== TestFest is an annual PHP community campaign designed to increase the test coverage of the PHP language. During this four month event, PHP User Groups and individuals are encouraged to organize and execute local meet-ups for the purpose of writing new PHPTs (PHP Tests) to cover currently untested functionality of the PHP language. ===== When will it be held? ===== TestFest 2010 will be held from May 1st, 2010 to August 31st, 2010. This does not mean you can't hold a local event prior to or after the official dates, in fact we really hope individuals and groups will continue to write test well after the event has ended. But from an organization standpoint, we needed to set a start and end date for the official campaign. ===== Where will it be held? ===== While TestFest is a world wide effort, the actual events are scheduled, organized and executed locally by User Groups and individuals in cities around the world. If you are looking for a local event to attend, check out the "Is There An Event Planned For My City?" section. If you wish to organize and run an event in your local city, please refer to the "How Do I Organize An Event In My City?" section. ===== How Do I Organize An Event In My City? ===== All TestFest events are organized and run by volunteers from cities around the world. If there isn't already an event being organized in your area, and you've got a little extra time on your hands, we'd love for you to organize and run an event of your own. The actual organization and execution of each event is pretty informal. If you have a nearby PHP User Group, we ask that coordinate with the local group when planning the event. Other than that, the following is a short list of recommended procedures for your event. - Find a suitable location for hosting your event. Local universities and corporations often have conference/meetings rooms which can be used during off-hours and weekends. Finding a location that will also provide Internet access is generally recommended, but not always possible. - Once you've found a suitable location and established a date and time which the facility will be made available to you, post the event details in the "Is There An Event Planned For My City?" section of this page. If you don't have edit privileges on the Wiki, email the event details to the [[mailto:php-qa@lists.php.net|QA mailing list]]. - Request an SVN repository and administrator account for your group. All tests produced by your group will be committed to your own SVN repository. QA moderators will review all your tests. If any problems are discovered they will fix them or contact you with recommended procedures for fixing them yourself. Once approved by a moderator, the tests will be committed into the PHP source tree. - Prepare a short presentation on writing PHPTs which we recommended you start your event off with. There are links to several tutorials and presentations in the Resource section of this page. - Have fun! ===== What Do I Need to Write PHPTs? ===== In most cases, you can use any text editor or IDE you like. PHPTs don't require any special software for their creation, so the same tools you use in your everyday work to write PHP applications, are the same tools you can use for writing PHPTs. ===== What Do I Need to Run PHPTs? ===== It's recommended that you run newly written PHPTs using test binaries built from the latest SVN checkouts or snapshots of the three main PHP branches: 5.2, 5.3 and Trunk. While it is possible to run PHPTs using pre-packaged PHP release binaries (avoiding the complication of compiling your own test binary of PHP), you may find that your test passes using the pre-packaged release binaries, but fails against the latest SVN revision or snapshot. In these cases, you or someone else will then be required to fix the test before committing it to the PHP SVN repository. So whenever possible, please build your test binary based on the latest SVN checkout or snapshot. ===== How Can I Build a PHP Testing Environment? ===== You will find either shells scripts for automatically downloading and building test PHP binaries using the latest snapshots (for Mac OS X and Ubuntu) or instructions for downloading and installing the latest automated builds (in the case of Windows). * Mac OS X Snow Leopard\\ Instructions for setting up a PHP testing environment on Mac OS X. [[qa:testfest-2010:mac-test-environment|Written Instructions.]] [[http://www.youtube.com/watch?v=lkw5jQ_EU2A|Screencast demonstration.]] * Ubuntu 9.10\\ Instructions for setting up a PHP testing environment on Ubuntu. [[qa:testfest-2010:ubuntu-test-environment|Written Instructions.]] [[http://www.youtube.com/watch?v=w6HlZrPRJXo|Screencast demonstration.]] * Windows\\ Instructions for setting up a PHP testing environment on Windows. [[qa:testfest-2010:windows-test-environment|Written Instructions.]] [[http://www.youtube.com/watch?v=J85aBLnZHA0|Screencast demonstration.]] * FreeBSD 7/8\\ Instructions for setting up a PHP testing environment on FreeBSD are coming soon, but the script is already available in the build package. ===== How Do I Write PHPTs? ===== PHPTs are fairly simple to write. For the most part, they are little more than PHP code written to exercise a particular feature or function of the PHP language along with the expected output from the PHP statements. To learn how to write and run PHPTs, please watch these screencasts. (Coming Soon). Also review [[http://qa.php.net/write-test.php|Creating new test files]] on the PHP QA website. For a detailed explanation of every aspect of PHPTs, please refer to [[http://qa.php.net/phpt_details.php|PHPT - Test File Layout]], also on the PHP QA website. ===== What Should I Write PHPTs For? ===== For beginner test writers, it's recommended that you start your search with native function and/or extensions that you are very familiar with. Once you've decided on what native function and/or extension you want to write tests for, you have the following two ways to find untested use cases. - You can search through the [[http://qa.php.net/tested-methods.php|Tested PHP Functions and Methods]] page which lists the current tested status for all functions in PHP. Next to each function name is a link to view all the tests currently written for that function. By examining all the tests currently written for a function, you can find use cases which aren't already tested. - If you are familiar with C, you can view the [[http://gcov.php.net/|GCOV]] report for the function/Class you wish to write tests for and find untested blocks of the C code which implement that function/Class. This method is only recommended for those who are familiar with C. ===== How Do I Submit PHPTs? ===== Each local event organizer can create SVN accounts for their local event. Ask your local organizer to create an SVN account for you. You will then be able to submit your PHPTs to the TestFest SVN repository. [[http://testfest.php.net/repos/testfest10/|PHP TestFest 2010 Repository]] If you show an aptitude for test writing and continue writing test after TestFest is over, you may be granted SVN access to the main PHP repository. ===== Is There An Event Planned For My City? ===== Below is a list of local events scheduled in cities around the world. Included with each event you'll find dates, locations, and organizer contact information. * **São Paulo, Brazil**: PHPSP UG [[http://www.phpsp.org.br|(website)]] - contact [at] phpsp.org.br * First edition: 29th May * Second edition: August/September * **Maastricht, The Netherlands**: PHPBenelux UG [[http://www.phpbenelux.eu|(website)]] - info [at] phpbenelux [dot] eu * Mentor: Felix De Vliegher, * Date: Saturday June 5th * Location: Hoogbrugstraat 1, 6221 Maastricht, The Netherlands [[http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Hoogbrugstraat+1+Maastricht&sll=50.847268,5.70199&sspn=0.002103,0.004839&ie=UTF8&hq=&hnear=Hoogbrugstraat+1,+6221+Maastricht,+Maastricht+railway+station,+Limburg,+The+Netherlands&t=h&z=16 | Google maps]] * More info: http://www.phpbenelux.eu/en/node/1328 * Subscribe/RSVP here: http://www.phpbenelux.eu/en/testfest2010registration * **Cesena, Italy**: Gr.U.S.P [[http://www.grusp.it/|(website)]] - http://www.grusp.it/contattaci * Date: Saturday June 26th and Sunday June 27th * Location: Ideato Srl, via Quinto Bucci 205, 47023, Cesena, Italy [[http://maps.google.it/maps?f=q&source=s_q&hl=it&geocode=&q=ideato&ie=UTF8&z=8&iwloc=A | Google maps]] * More info and RSVP: http://phptestfest2010.eventbrite.com/ * **The Next HOPE / New York City**: Daniel Convissor * Date: Saturday, July 17 * Location: [[http://wiki.hope.net/Hackerspace_Village|Hackerspace Village]], [[http://thenexthope.org/|The Next HOPE Conference]], Hotel Pennsylvania, 7th Ave at 33rd St, New York City * Time: 2:00 PM - 5:00 PM * NOTE: There is an admission fee for the conference * **Berlin, Germany**: [[http://bephpug.de/|PHP Usergroup Berlin]] * Date: Sunday, August 29th * Location: [[http://co-up.de|co-up coworking]], Adalbertstrasse 7-8, 10999 Berlin, Germany * Subscribe: [[http://twitter.com/bephpug|http://twitter.com/bephpug]], [[https://mail.einsnull.com/mailman/listinfo/bephpug|mailing list]] * **Atlanta, GA - USA**: [[http://atlantaphp.org/|Atlanta PHP User Group]] (WARNING: LOCATION CHANGE!) * Date: August 7th, 2010 * Time: 10:00 AM - 5:00 PM EST * Location: Cobb Exchange [[http://cobbx.com/|CobbX]] * Address: 1880 West Oak Pkwy, Suite 102, Marietta, GA 30062 * Directions: - Take I-75 exit 267A/Canton Rd. - Ordered List Item - Merge onto Canton Rd (1.3 mi) - Turn right onto Sandy Plains Rd. (0.4 mi) - Turn right onto West Oak Pkwy (0.1 mi) -Make a left at the North Point office park * RSVP: Please RSVP to [[mailto:ericleestewart@gmail.com|Eric Lee Stewart]] with your name and email address. We need this information in order to setup your temporary Internet access account at the event and to setup your SVN account. * **Brooklyn, New York**: [[http://www.meetup.com/BKTK-meetup/|BKTK Meetup]] * Date: Saturday, August 28 * Time: 12:00 PM - 4:00 PM * Location: Sunset Park, Brooklyn * Please RSVP via the [[http://www.meetup.com/BKTK-meetup/calendar/14197299/|Meetup event page]] * If you //really// don't want to sign up for a Meetup account, you can [[http://www.analysisandsolutions.com/contact/contact.htm|contact the organizer directly]]. * **Brasília, Brazil**: At Universidade Católica de Brasília (UCB - Taguatinga) - paulovitorbal [at] gmail.com * Date: 28-08-2010 * Time: 9 a.m ~ 18p.m. * More info at: [[ttp://www.brasiliatestfest.com.br/]] * **France / Lille** : Frédéric Hardy (http://blog.mageekbox.net) * Date: Saturday, August 21 * Location: No Parking (http://www.noparking.net), 165 avenue de Bretagne, 59000 Lille. * Time: 13:30 PM - 19:00 PM * No subscription. * **UK / Manchester** : Ben Longden (http://www.phpnw.org.uk/) * Date: Saturday 11th September * Location: Madlab, Manchester * Time: 12:00 PM - 06:00 PM * Registration: http://upcoming.yahoo.com/event/6621123 ===== Resources - QA ===== [[http://qa.php.net/|PHP QA - Homepage]] [[http://wiki.php.net/qa|PHP WIKI - QA]] [[http://wiki.php.net/qa/testfest-2010|PHP WIKI - TestFest]] ===== Resources - Test Writing ===== [[http://qa.php.net/write-test.php|PHP QA - Writing Tests]] [[http://qa.php.net/phpt_details.php|PHP QA - Details of PHPT format]] [[http://qa.php.net/expectf_details.php|PHP QA - EXPECTF substitution options]] [[http://qa.php.net/autogenerate.php|PHP QA - Auto-generating test cases.]] [[http://wiki.php.net/doc/articles/writing-tests|PHP WIKI - Writing Tests]] [[http://wiki.php.net/qa/phptlessonslearned|PHP WIKI - Lessons Learned from PHPT Writing]] [[http://wiki.php.net/qa/testfesttalk|PHP WIKI - PHPT roundup talk.]] [[http://sebastian-bergmann.de/archives/777-PHP-Test-Fest-Slides.html|PHP TestFest Slides]] [[http://www.slideshare.net/sebastian_bergmann/php-testfest-cologne?src=embed|PHP TestFest - Cologne]] [[http://felix.phpbelgium.be/blog/2008/05/22/writing-phpt-tests-on-your-mac/|Writing PHPT tests on your mac.]] [[http://www.phplondon.org/conference/2008/media/docs/TestOrDie_Zoe_Slattery.pdf|Zoes 2008 Testfest Talk]] [[http://wiki.php.net/qa/credits|PHP WIKI - Crediting test authors.]] [[http://svn.php.net/viewvc/php/php-src/trunk/README.TESTING?view=markup|PHP SVN - README.TESTING]] [[http://svn.php.net/viewvc/php/php-src/trunk/README.TESTING2?view=markup|PHP SVN - README.TESTING2]] [[http://wiki.php.net/qa/uploading|PHP WIKI - What to do with your test when you have written it.]] [[http://somabo.de/talks/200703_montreal_need_for_testing.pdf|Testing in the PHP World]] [[http://wiki.php.net/qa/organisers|PHP WIKI - Suggestions and checklist.]] [[http://testfest.php.net/displayresults.php|PHP Testfest - SVN Reporting: 64-bit PPC Linux]] [[http://results.testfest.php.net/|PHP Testfest - SVN Reporting: 32-bit Linux]] ===== Resources - Code Coverage ===== [[http://gcov.php.net/|PHP GCOV - Test and Code Coverage Analysis]] [[http://qa.php.net/tested-methods.php|PHP QA - Tested PHP Functions and Methods]] [[http://wiki.php.net/qa/whattotest|PHP WIKI - More information on what to test]] [[http://wiki.php.net/qa/testcoverage|PHP WIKI - How to look at the test coverage for an extension]] ===== Resources - Source Code Access ===== [[http://snaps.php.net/|PHP Source Code Snapshots]] [[http://svn.php.net/|PHP SVN]] ===== TODO List ===== Tasks still remaining to be complete. If no name follows a test, this task not only needs to be complete, but needs someone to take responsibility of it. * Complete TestFest-2010 Wiki Page. [[mailto:ericleestewart@gmail.com|Eric Lee Stewart]] * Screencasts - [[mailto:ericleestewart@gmail.com|Eric Lee Stewart]] * TestFest SVN Repository - Rafael Dohms