<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jacob Santos &#187; Projects</title>
	<atom:link href="http://jacobsantos.com/tags/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://jacobsantos.com</link>
	<description>Rumblings, rants, essays, stories by Jacob Santos about Web Site Development, Persistent Browser-Based Games, personal journal, and Programming.</description>
	<lastBuildDate>Fri, 03 Feb 2012 01:06:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3-aortic-dissection</generator>
		<item>
		<title>Unit Tests for WordPress</title>
		<link>http://jacobsantos.com/2007/projects/unit-tests-for-wordpress/</link>
		<comments>http://jacobsantos.com/2007/projects/unit-tests-for-wordpress/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 01:00:17 +0000</pubDate>
		<dc:creator>santosj</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[planning]]></category>
		<category><![CDATA[unit test]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.santosj.name/projects/unit-tests-for-wordpress/</guid>
		<description><![CDATA[<a href="http://jacobsantos.com/2007/projects/unit-tests-for-wordpress/" title="Unit Tests for WordPress"></a>I think for as much coverage as possible the following should be done for encompassing the whole of WordPress using tests. The PHPUnit version 3.2.0 should include many new features that should allow for better testing WordPress in environments more &#8230;<p class="read-more"><a href="http://jacobsantos.com/2007/projects/unit-tests-for-wordpress/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://jacobsantos.com/2007/projects/unit-tests-for-wordpress/" title="Unit Tests for WordPress"></a><p>I think for as much coverage as possible the following should be done for encompassing the whole of WordPress using tests. The PHPUnit version 3.2.0 should include many new features that should allow for better testing WordPress in environments more true to XP programming techniques. Along with PHPUnit, I have been meaning to build a site for statistics, but I think it will come later when I have more tests done.</p>
<ol>
<li>Unit Tests and Characterization Tests.</li>
<li>Hook Tests</li>
<li>Database Tests</li>
<li>Acceptance Tests</li>
</ol>
<h3>Unit Tests and Characterization Tests</h3>
<p>There aren&#8217;t very many functions or library files that allow for true Unit Testing, so I would rather combine the two tests, instead of trying to keep them separate. This would allow for coders writing tests to not worry about whether the function can be unit tested or have characterization tests. Comments should be made for the methods on what is tested to let others know if the test is an unit test or characterization test to the knowledge of the author.</p>
<p>All actions and filters will have to be disabled while running the tests to allow for just testing the functions. Testing the hooks would be done separately. Looking through some of the bug reports, it seems that some hooks are required to test for some obscure bugs. This should be done in the next section.</p>
<p>The unit tests and characterizations tests should be run by themselves, separate in execution from the rest of the tests. I have also been meaning to remove dependencies on my changes. I think that since the last WordPress commit, that is no longer an issue.</p>
<h3>Hook Tests</h3>
<p>Remove all filters and actions and manually add the hook workflow to test the result. This would require mock functions that duplicate the functions or running the full version of WordPress, except for the output.</p>
<p>Testing the hooks has more to do with regressions and refactoring of hooks, since hooks should work as long as the plugin test passes.</p>
<h3>Database Tests</h3>
<p>PHPUnit 3.2.0 will include DBUnit which will allow using a snapshot of the database and test output using that instead of a real database. This should be extremely helpful in testing Database Queries.</p>
<h3>Acceptance Tests</h3>
<p>Test the blog site to make sure that everything appears correctly.</p>

<p><strong>Possibly Related Posts:</strong></p>
<ul>
<li><a href="http://jacobsantos.com/2011/projects/calibre-improvements/">Calibre Improvements</a></li>
<li><a href="http://jacobsantos.com/2011/projects/dragonu-bug-tracker-dev-milestone-1/">DragonU Bug Tracker Dev &#8211; Milestone 1</a></li>
<li><a href="http://jacobsantos.com/2009/projects/dragon-mvc/">Dragon MVC</a></li>
<li><a href="http://jacobsantos.com/2009/projects/why-i-contributed-to-wordpress/">Why I Contributed to WordPress</a></li>
<li><a href="http://jacobsantos.com/2009/projects/dragonu-db-component/">DragonU DB Component</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://jacobsantos.com/2007/projects/unit-tests-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

