<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Automated Frontend Testing &#8211; The Talk</title>
	<atom:link href="http://thecodetrain.co.uk/2009/04/automated-frontend-testing-the-talk/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecodetrain.co.uk/2009/04/automated-frontend-testing-the-talk/</link>
	<description>Where Neil Crosby talks about coding on the train...</description>
	<lastBuildDate>Sat, 21 Aug 2010 06:15:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Neil Crosby</title>
		<link>http://thecodetrain.co.uk/2009/04/automated-frontend-testing-the-talk/comment-page-1/#comment-398</link>
		<dc:creator>Neil Crosby</dc:creator>
		<pubDate>Mon, 18 May 2009 14:11:33 +0000</pubDate>
		<guid isPermaLink="false">http://thecodetrain.co.uk/?p=226#comment-398</guid>
		<description>&lt;p&gt;Thanks for the comment (and sorry it took so long to reply).&lt;/p&gt;

&lt;p&gt;Just so you know, I&#039;ve rolled up what you said here and started to turn it into a bit of a quickstart Setup guide at http://github.com/NeilCrosby/frontend-test-suite/blob/master/SETUP.Markdown - hopefully that&#039;ll make it a bit easier for new people to start using the project in the future.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for the comment (and sorry it took so long to reply).</p>

<p>Just so you know, I&#8217;ve rolled up what you said here and started to turn it into a bit of a quickstart Setup guide at <a href="http://github.com/NeilCrosby/frontend-test-suite/blob/master/SETUP.Markdown" rel="nofollow">http://github.com/NeilCrosby/frontend-test-suite/blob/master/SETUP.Markdown</a> &#8211; hopefully that&#8217;ll make it a bit easier for new people to start using the project in the future.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: theSmaw</title>
		<link>http://thecodetrain.co.uk/2009/04/automated-frontend-testing-the-talk/comment-page-1/#comment-336</link>
		<dc:creator>theSmaw</dc:creator>
		<pubDate>Thu, 16 Apr 2009 13:11:04 +0000</pubDate>
		<guid isPermaLink="false">http://thecodetrain.co.uk/?p=226#comment-336</guid>
		<description>&lt;p&gt;Hi Neil,&lt;/p&gt;

&lt;p&gt;The Suite looks awesome.&lt;/p&gt;

&lt;p&gt;As my knowledge of PHP goes no further than messing with the Wordpress loop, it took me a little while to get the suite up and running on my machine as I wasn&#039;t sure what did what.&lt;/p&gt;

&lt;p&gt;I might be running it totally the wrong way, but here&#039;s what I did, in my Idiot&#039;s Guide to the Automated Frontend Testing Suite:&lt;/p&gt;

&lt;p&gt;1) Install PHP if you don&#039;t already have it.&lt;/p&gt;

&lt;p&gt;I got the latest version from: http://uk2.php.net/get/php-5.2.9-2-Win32.zip/from/a/mirror&lt;/p&gt;

&lt;p&gt;During the install, I chose &#039;Do not setup a web server&#039;. I then recommend installing the entire PHP feature, as some of the extensions and extras are required to get PEAR/PHPUnit going.&lt;/p&gt;

&lt;p&gt;2) PEAR should have been installed with the package above.  If not, you will nead to get it from http://pear.php.net/PEAR&lt;/p&gt;

&lt;p&gt;3) To install PHPUnit, from the command line type&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;pear channel-discover pear.phpunit.de&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and then&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;pear install phpunit/PHPUnit&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;4) Download the test suite from http://github.com/NeilCrosby/frontend-test-suite/tree/master and extract&lt;/p&gt;

&lt;p&gt;5) On lines 4 and 5 of &lt;code&gt;suite/TheCodeTrainEasyFrontendTestSuite.php&lt;/code&gt; are two &#039;require_once&#039; statements.  I had to change these to point to the same files within my PHPUnit install location, so they now look like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;require_once(&#039;C:/Program Files/PHP/PEAR/PHPUnit/Framework/TestCase.php&#039;);
require_once(&#039;C:/Program Files/PHP/PEAR/PHPUnit/TextUI/TestRunner.php&#039;);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;However, when I included the TestRunner.php file I got this error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&#039;Fatal error: Cannot redclare class PHPUnit&lt;em&gt;TextUI&lt;/em&gt;TestRunner in 
C:&#92;Program Files&#92;PHP&#92;PEAR&#92;PHPUnit&#92;TextTI&#92;TestRunner.php on line 783&#039;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I removed the second require_once from above and everything seems to still work ok.&lt;/p&gt;

&lt;p&gt;6) From lines 149 - 197 is a bunch of commented out code.  By uncommenting this I was able to run my tests here.&lt;/p&gt;

&lt;p&gt;So, for example, I just want to play with the HTML Validator for now, so I replaced the commented block with:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PHPUnit&lt;em&gt;TextUI&lt;/em&gt;TestRunner::run(TheCodeTrainEasyFrontendTestSuite::suite(
    array(
        &#039;html&#039; =&gt; array(
            &#039;validator&#039; =&gt; &#039;http://validator.w3.org/check&#039;, // don&#039;t use this use a local one!
            &#039;tests&#039; =&gt; array(
                array(&#039;http://icanhascheezburger.com/2007/01/11/oh-hay-i-has-bad-newz/&#039;)
            )
        )
    )
));&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;7) I wasted far too much time being an eejit and trying to run the validator at &#039;http://mylocalvalidator&#039; rather than &#039;http://mylocalvalidator/check&#039;&lt;/p&gt;

&lt;p&gt;8) To run the suite, return to the command line and depending on where you&#039;ve extracted the suite, type something like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;phpunit C:&#92;Development&#92;frontentTestSuite&#92;suite&#92;TheCodeTrainEasyFrontendTestSuite.php&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I now get a lovely slew of validation errors in my command line window.  I&#039;ve not got as far as doing anything useful with them yet.  I&#039;m hoping that I can easily integrate this into a build process using the PHPUnit plugin for Maven - I&#039;ll let you know how I get on!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Neil,</p>

<p>The Suite looks awesome.</p>

<p>As my knowledge of PHP goes no further than messing with the Wordpress loop, it took me a little while to get the suite up and running on my machine as I wasn&#8217;t sure what did what.</p>

<p>I might be running it totally the wrong way, but here&#8217;s what I did, in my Idiot&#8217;s Guide to the Automated Frontend Testing Suite:</p>

<p>1) Install PHP if you don&#8217;t already have it.</p>

<p>I got the latest version from: <a href="http://uk2.php.net/get/php-5.2.9-2-Win32.zip/from/a/mirror" rel="nofollow">http://uk2.php.net/get/php-5.2.9-2-Win32.zip/from/a/mirror</a></p>

<p>During the install, I chose &#8216;Do not setup a web server&#8217;. I then recommend installing the entire PHP feature, as some of the extensions and extras are required to get PEAR/PHPUnit going.</p>

<p>2) PEAR should have been installed with the package above.  If not, you will nead to get it from <a href="http://pear.php.net/PEAR" rel="nofollow">http://pear.php.net/PEAR</a></p>

<p>3) To install PHPUnit, from the command line type</p>

<pre><code>pear channel-discover pear.phpunit.de</code></pre>

<p>and then</p>

<pre><code>pear install phpunit/PHPUnit</code></pre>

<p>4) Download the test suite from <a href="http://github.com/NeilCrosby/frontend-test-suite/tree/master" rel="nofollow">http://github.com/NeilCrosby/frontend-test-suite/tree/master</a> and extract</p>

<p>5) On lines 4 and 5 of <code>suite/TheCodeTrainEasyFrontendTestSuite.php</code> are two &#8216;require_once&#8217; statements.  I had to change these to point to the same files within my PHPUnit install location, so they now look like</p>

<pre><code>require_once('C:/Program Files/PHP/PEAR/PHPUnit/Framework/TestCase.php');
require_once('C:/Program Files/PHP/PEAR/PHPUnit/TextUI/TestRunner.php');</code></pre>

<p>However, when I included the TestRunner.php file I got this error:</p>

<pre><code>'Fatal error: Cannot redclare class PHPUnit<em>TextUI</em>TestRunner in 
C:&#92;Program Files&#92;PHP&#92;PEAR&#92;PHPUnit&#92;TextTI&#92;TestRunner.php on line 783'</code></pre>

<p>I removed the second require_once from above and everything seems to still work ok.</p>

<p>6) From lines 149 &#8211; 197 is a bunch of commented out code.  By uncommenting this I was able to run my tests here.</p>

<p>So, for example, I just want to play with the HTML Validator for now, so I replaced the commented block with:</p>

<pre><code>PHPUnit<em>TextUI</em>TestRunner::run(TheCodeTrainEasyFrontendTestSuite::suite(
    array(
        'html' =&gt; array(
            'validator' =&gt; 'http://validator.w3.org/check', // don't use this use a local one!
            'tests' =&gt; array(
                array('http://icanhascheezburger.com/2007/01/11/oh-hay-i-has-bad-newz/')
            )
        )
    )
));</code></pre>

<p>7) I wasted far too much time being an eejit and trying to run the validator at &#8216;http://mylocalvalidator&#8217; rather than &#8216;http://mylocalvalidator/check&#8217;</p>

<p>8) To run the suite, return to the command line and depending on where you&#8217;ve extracted the suite, type something like:</p>

<pre><code>phpunit C:&#92;Development&#92;frontentTestSuite&#92;suite&#92;TheCodeTrainEasyFrontendTestSuite.php</code></pre>

<p>I now get a lovely slew of validation errors in my command line window.  I&#8217;ve not got as far as doing anything useful with them yet.  I&#8217;m hoping that I can easily integrate this into a build process using the PHPUnit plugin for Maven &#8211; I&#8217;ll let you know how I get on!</p>]]></content:encoded>
	</item>
</channel>
</rss>
