{"id":13589,"date":"2011-06-09T11:43:37","date_gmt":"2011-06-09T11:43:37","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/presstest\/"},"modified":"2011-10-02T09:25:31","modified_gmt":"2011-10-02T09:25:31","slug":"presstest","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/presstest\/","author":5866312,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.2","stable_tag":"0.2","tested":"3.2.1","requires":"3.2","requires_php":"","requires_plugins":"","header_name":"PressTest","header_author":"Kunal Bhalla.","header_description":"","assets_banners_color":"","last_updated":"2011-10-02 09:25:31","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/Send%20any%20donations%20to%20bhalla.kunal@gmail.com","header_plugin_uri":"http:\/\/explog.in\/PressTest","header_author_uri":"http:\/\/kunal-b.in","rating":0,"author_block_rating":0,"active_installs":0,"downloads":807,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"":"<p>Please note that this is an alpha release and unstable. Any and all parts of the API\/functions created are susceptible to change till version 1.0<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.2","0.2"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1623507","resolution":"2","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1623507","resolution":"3","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1623507","resolution":"1","location":"plugin"}},"screenshots":{"1":"Running qUnit with sample tests.","2":"The additional links to run tests.","3":"Running phpUnit with sample tests."}},"plugin_section":[],"plugin_tags":[3772,47171,50947,50491],"plugin_category":[],"plugin_contributors":[89966],"plugin_business_model":[],"class_list":["post-13589","plugin","type-plugin","status-closed","hentry","plugin_tags-developers","plugin_tags-phpunit","plugin_tags-qunit","plugin_tags-unit-testing","plugin_contributors-kunalb","plugin_committers-kunalb"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/presstest.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/presstest\/trunk\/screenshot-1.png?rev=1623507","caption":"Running qUnit with sample tests."},{"src":"https:\/\/ps.w.org\/presstest\/trunk\/screenshot-2.png?rev=1623507","caption":"The additional links to run tests."},{"src":"https:\/\/ps.w.org\/presstest\/trunk\/screenshot-3.png?rev=1623507","caption":"Running phpUnit with sample tests."}],"raw_content":"<!--section=description-->\n<p>The Pragmatic Programmer, Tip 49:\n  \"Test your software, or your users will.\"<\/p>\n\n<p>PressTest is a WordPress plugin aimed at simplifying writing unit tests for Plugins. It integrates phpUnit and qUnit within WordPress, allowing you to test your plugins without leaving the comfort of your browser -- or having to create a fresh install.<\/p>\n\n<p>Drop your plugin's unit tests into a ptest folder within the plugin's root directory (at the moment only the 1st level of the directory is tested for tests) and a link will appear on the Plugins page to run tests.<\/p>\n\n<p>At the moment, PressTest provides a file that mocks all core functions in WordPress, all of which call a 'mime' to imitate the function as required by you. Read the internal documentation in the file pt-mime.php to see how to customize mocked function and class behaviour. Tests for PT_Mime at ptests\/PT_Mime_Test.php will further help in understanding usage.<\/p>\n\n<p>Note: This plugin follows semantic tagging -- in short, consider all versions starting as 0.x unstable; feature releases incrementing by .x, bugfix releases by .0x and backwards incompatible changes with x.00.<\/p>\n\n<h3>Features<\/h3>\n\n<ul>\n<li>Integrates phpUnit and qUnit with your WordPress install<\/li>\n<li>Generates a set of mock functions from wordpress core that can be used for writing unit tests<\/li>\n<\/ul>\n\n<!--section=installation-->\n<p>Add the presstest folder to your <code>&lt;install&gt;\/wp-content\/plugins\/<\/code> directory.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>The plugin gives an error about time elapsed\/memory used<\/dt>\n<dd><p>PressTest is a memory intensive plugin, particularly while it generates the mock functions.<\/p>\n\n<p>It attempts to increase the maximum running time during runtime but that can fail depending on your server's settings.<\/p>\n\n<p>This is something that will be resolved by the first release: till then I recommend using this plugin strictly on your dev setup.<\/p><\/dd>\n<dt>The plugin gives an error about files not found<\/dt>\n<dd><p>As a hackish way to get around modifying phpUnit, the include path is modified on runtime. If your server doesn't permit changing the include path, then the tests will not run.<\/p>\n\n<p>Again, this is something that will be resolved by the first release.<\/p><\/dd>\n<dt>Why?<\/dt>\n<dd><p>Because.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.2<\/h4>\n\n<ul>\n<li>Added mockable functions and classes with configurable behaviour.<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Inital release -- basic phpUnit and qUnit integration.<\/li>\n<\/ul>","raw_excerpt":"&quot;Test early. Test often. Test Automatically.&quot;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/13589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=13589"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/kunalb"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=13589"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=13589"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=13589"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=13589"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=13589"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=13589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}