mirror of
https://github.com/php/presentations.git
synced 2026-03-23 23:22:22 +01:00
- PHP NW TDD talk.
This commit is contained in:
68
practical-tdd-phpnw9.xml
Normal file
68
practical-tdd-phpnw9.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<presentation
|
||||
template="css"
|
||||
navmode="html"
|
||||
navbarbackground="#4373b4"
|
||||
navbartopiclinks="0"
|
||||
navColor="#f1fbff"
|
||||
logo1=""
|
||||
stylesheet="presentations/slides/ezc/ez.css"
|
||||
backgroundfixed="1" >
|
||||
<topic>Testing</topic>
|
||||
<title>Practical Test-Driven Development</title>
|
||||
<event>PHP Northwest Meeting</event>
|
||||
<location>Manchester, UK</location>
|
||||
<date>September 1st, 2009</date>
|
||||
<speaker>Derick Rethans</speaker>
|
||||
<email>dr@ez.no</email>
|
||||
<twitter>derickr</twitter>
|
||||
<url>http://derickrethans.nl/talks.php</url>
|
||||
|
||||
<slide>slides/tdd/title.xml</slide>
|
||||
|
||||
<!-- Funny Intro -->
|
||||
<slide>slides/tdd/broken-code-is-fine.xml</slide>
|
||||
<slide>slides/tdd/dont-ship.xml</slide>
|
||||
<slide>slides/tdd/unit-testing.xml</slide>
|
||||
|
||||
<!-- TDD intro
|
||||
- Development process, not just a test method
|
||||
- It is a religion: ✡✝☪
|
||||
- Traditional development
|
||||
- TDD
|
||||
- when to run tests
|
||||
-->
|
||||
<slide>slides/tdd/not-a-testing-method.xml</slide>
|
||||
<slide>slides/tdd/back-in-time.xml</slide>
|
||||
<slide>slides/tdd/darth.xml</slide>
|
||||
<slide>slides/tdd/the-test-is-king.xml</slide>
|
||||
<slide>slides/tdd/test-driven-development.xml</slide>
|
||||
<slide>slides/tdd/practical-test-driven-development.xml</slide>
|
||||
<slide>slides/tdd/addressing-defects.xml</slide>
|
||||
|
||||
<!-- Quick php unit example
|
||||
- Quick example
|
||||
- Code coverage
|
||||
- some problems with leaking, system dependent things, can't test private
|
||||
methods, hard to test exceptions - things that should not happen
|
||||
-->
|
||||
<slide>slides/tdd/phpunit.xml</slide>
|
||||
<slide>slides/tdd/phpunit-output.xml</slide>
|
||||
<slide>slides/tdd/no-code-without-test.xml</slide>
|
||||
<slide>slides/tdd/no-code-without-test2.xml</slide>
|
||||
<slide>slides/tdd/no-code-without-test3.xml</slide>
|
||||
<slide>slides/tdd/no-code-without-test4.xml</slide>
|
||||
<slide>slides/tdd/phpundercontrol.xml</slide>
|
||||
|
||||
<!-- Politics -->
|
||||
<slide>slides/tdd/why-no-tdd.xml</slide>
|
||||
|
||||
<!-- TDD case studies
|
||||
-->
|
||||
<slide>slides/tdd/case-study-major-players.xml</slide>
|
||||
<slide>slides/tdd/case-study-dev-testimonials.xml</slide>
|
||||
|
||||
<slide>slides/tdd/unit-test-issues.xml</slide>
|
||||
<slide>slides/internals/questions.xml</slide>
|
||||
<slide>slides/tdd/resources.xml</slide>
|
||||
</presentation>
|
||||
BIN
slides/tdd/100-perc-cc.png
Normal file
BIN
slides/tdd/100-perc-cc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -5,7 +5,7 @@
|
||||
|
||||
<list>
|
||||
<bullet>At first I didn't like that I need to write tests for my code,
|
||||
but now after using it for more than 10 months I can't program without
|
||||
but now after using it for more than two years I can't program without
|
||||
it.</bullet>
|
||||
</list>
|
||||
<list>
|
||||
|
||||
BIN
slides/tdd/chorizo.jpg
Normal file
BIN
slides/tdd/chorizo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
@@ -3,15 +3,9 @@
|
||||
<title>PHPUnit</title>
|
||||
<subtitle>Code Coverage: How important?</subtitle>
|
||||
|
||||
<blurb class="blurb_header">How much coverage should you aim for?</blurb>
|
||||
<blurb class='quote_attr'>http://www.developertesting.com/archives/month200705/20070504-000425.html</blurb>
|
||||
<break lines="3"/>
|
||||
<blurb class="blurb_header">< 100% Coverage ≡ Not fully tested code</blurb>
|
||||
<blurb class="blurb_header">100% Coverage ≢ Fully tested code</blurb>
|
||||
<break lines="3"/>
|
||||
<blurb class="blurb_header">How much coverage should you aim for?</blurb>
|
||||
<list>
|
||||
<bullet>It doesn't matter, just write some tests.</bullet>
|
||||
<bullet>How much rice do I need to cook?</bullet>
|
||||
<bullet>100%, and no less!</bullet>
|
||||
</list>
|
||||
<break lines="3"/>
|
||||
<blurb class='quote_attr'>http://www.developertesting.com/archives/month200705/20070504-000425.html</blurb>
|
||||
</slide>
|
||||
|
||||
20
slides/tdd/no-code-without-test4.xml
Normal file
20
slides/tdd/no-code-without-test4.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<slide fontsize="6em">
|
||||
<title>Code Coverage: 100% is not good enough</title>
|
||||
|
||||
<image align="center" filename="100-perc-cc.png"/>
|
||||
|
||||
<example><![CDATA[<?php require 'PathTest.php';
|
||||
class CcTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testPath1()
|
||||
{
|
||||
self::assertEquals( 2, PathTest::testMethod( true, false ) );
|
||||
}
|
||||
public function testPath2()
|
||||
{
|
||||
self::assertEquals( 3, PathTest::testMethod( false, true ) );
|
||||
}
|
||||
}
|
||||
?>]]></example>
|
||||
</slide>
|
||||
BIN
slides/tdd/phpuc.png
Normal file
BIN
slides/tdd/phpuc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 141 KiB |
@@ -3,6 +3,6 @@
|
||||
<title>phpUnderControl</title>
|
||||
<subtitle>Continuous integration with CruiseControl</subtitle>
|
||||
|
||||
<image align="center" filename="phpundercontrol.jpg"/>
|
||||
<image align="center" filename="phpuc.png"/>
|
||||
|
||||
</slide>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 81 KiB |
@@ -7,6 +7,6 @@
|
||||
<bullet>System/Operating System dependent tests</bullet>
|
||||
<bullet>Private methods</bullet>
|
||||
<bullet>Code that depends on the state of an external resource</bullet>
|
||||
<bullet>Things that simply should never happen</bullet>
|
||||
<bullet>Things that simply should "never" happen</bullet>
|
||||
</list>
|
||||
</slide>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<blurb>The testing of a whole integrated system against the specified
|
||||
requirements. ~*Tools*: Selenium~</blurb>
|
||||
<break lines="2"/>
|
||||
<image align="left" filename="chorizo.jpg"/>
|
||||
<blurb class="blurb_header">Non-functional Testing</blurb>
|
||||
<blurb>Testing for performance, load, stress, reliability, availability,
|
||||
security. ~*Tools*: ab, siege, httperf, chorizo~</blurb>
|
||||
|
||||
20
slides/tdd/why-no-tdd.xml
Normal file
20
slides/tdd/why-no-tdd.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<slide fontsize="6em">
|
||||
<title>What stops you from doing TDD?</title>
|
||||
|
||||
<blurb class="subtitle_blurb">Fear - more work to do</blurb>
|
||||
<list>
|
||||
<bullet>Introduce TDD concepts gently</bullet>
|
||||
<bullet>Whenever a problem is found, make and retain a test case for futher use</bullet>
|
||||
<bullet>Start using TDD for new projects</bullet>
|
||||
</list>
|
||||
|
||||
<blurb class="subtitle_blurb">Ignorance - too much time spent on testing</blurb>
|
||||
<list>
|
||||
<bullet>Out of date with modern processes</bullet>
|
||||
<bullet>Belief that testing slows the schedule (only if you follow the
|
||||
ship-and-see process)</bullet>
|
||||
<bullet>You save time later, because you wouldn't have to re-test or
|
||||
re-debug newly written additions or big fixes.</bullet>
|
||||
</list>
|
||||
</slide>
|
||||
Reference in New Issue
Block a user