?? overview.html.svn-base
字號:
<td>SSL support</td> <td>Can connect to https: pages</td> <td style="color: green;">1.0</td> </tr> <tr> <td>Proxy support</td> <td>Can connect via. common proxies</td> <td style="color: green;">1.0</td> </tr> <tr> <td>Frames support</td> <td>Handling of frames in web test cases</td> <td style="color: green;">1.0</td> </tr> <tr> <td>File upload testing</td> <td>Can simulate the input type file tag</td> <td style="color: green;">1.0.1</td> </tr> <tr> <td>Mocking interfaces</td> <td> Can generate mock objects to interfaces as well as classes and class interfaces are carried for type hints </td> <td style="color: green;">1.0.1</td> </tr> <tr> <td>Testing exceptions</td> <td>Similar to testing PHP errors</td> <td style="color: green;">1.0.1</td> </tr> <tr> <td>HTML label support</td> <td>Can access all controls using the visual label</td> <td style="color: green;">1.0.1</td> </tr> <tr> <td>Base tag support</td> <td>Respects page base tag when clicking</td> <td style="color: green;">1.0.1</td> </tr> <tr> <td>PHP 5 E_STRICT compliant</td> <td>PHP 5 only version that works with the E_STRICT error level</td> <td style="color: red;">1.1</td> </tr> <tr> <td>BDD style fixtures</td> <td>Can import fixtures using a mixin like given() method</td> <td style="color: red;">1.5</td> </tr> <tr> <td>Reporting machinery enhancements</td> <td>Improved message passing for better cooperation with IDEs</td> <td style="color: red;">1.5</td> </tr> <tr> <td>Fluent mock interface</td> <td>More flexible and concise mock objects</td> <td style="color: red;">1.6</td> </tr> <tr> <td>Localisation</td> <td>Messages abstracted and code generated</td> <td style="color: red;">1.6</td> </tr> <tr> <td>CSS selectors</td> <td>HTML content can be examined using CSS selectors</td> <td style="color: red;">1.7</td> </tr> <tr> <td>HTML table assertions</td> <td>Can match HTML or table elements to expectations</td> <td style="color: red;">1.7</td> </tr> <tr> <td>Unified acceptance testing model</td> <td>Content searchable through selectors combined with expectations</td> <td style="color: red;">1.7</td> </tr> <tr> <td>DatabaseTestCase</td> <td>SQL selectors and DB drivers</td> <td style="color: red;">1.7</td> </tr> <tr> <td>IFrame support</td> <td>Reads IFrame content that can be refreshed</td> <td style="color: red;">1.8</td> </tr> <tr> <td>Alternate HTML parsers</td> <td>Can detect compiled parsers for performance improvements</td> <td style="color: red;">1.8</td> </tr> <tr> <td>Integrated Selenium support</td> <td>Easy to use built in Selenium driver and tutorial</td> <td style="color: red;">1.9</td> </tr> <tr> <td>Code coverage</td> <td>Reports using the bundled tool when using XDebug</td> <td style="color: red;">1.9</td> </tr> <tr> <td>Deprecation of old methods</td> <td>Simpler interface for SimpleTest2</td> <td style="color: red;">2.0</td> </tr> <tr> <td>Javascript suport</td> <td>Use of PECL module to add Javascript to the native browser</td> <td style="color: red;">3.0</td> </tr> </tbody></table> PHP5 migraton will start straight after the version 1.0.1 series, whereupon only PHP 5.1+ will be supported. SimpleTest is currently compatible with PHP 5, but will not make use of all of the new features until version 1.1. </p> <p><a class="target" name="resources"><h2>Web resources for testing</h2></a></p> <p> Process is at least as important as tools. The type of process that makes the heaviest use of a developer's testing tool is of course <a href="http://www.extremeprogramming.org/">Extreme Programming</a>. This is one of the <a href="http://www.agilealliance.com/articles/index">Agile Methodologies</a> which combine various practices to "flatten the cost curve" of software development. More extreme still is <a href="http://www.testdriven.com/modules/news/">Test Driven Development</a>, where you very strictly adhere to the rule of no coding until you have a test. If you're more of a planner, or believe that experience trumps evolution, you may prefer the <a href="http://www.therationaledge.com/content/dec_01/f_spiritOfTheRUP_pk.html">RUP</a> approach. I haven't tried it, but even I can see that you will need test tools (see figure 9). </p> <p> Most unit testers clone <a href="http://www.junit.org/">JUnit</a> to some degree, as far as the interface at least. There is a wealth of information on the JUnit site including the <a href="http://junit.sourceforge.net/doc/faq/faq.htm">FAQ</a> which contains plenty of general advice on testing. Once you get bitten by the bug you will certainly appreciate the phrase <a href="http://junit.sourceforge.net/doc/testinfected/testing.htm">test infected</a> coined by Eric Gamma. If you are still reviewing which unit tester to use you can find pretty complete lists from <a href="http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks">Wikipedia</a>, <a href="http://www.testingfaqs.org/t-unit.html">Software testing FAQ</a>, and <a href="http://www.opensourcetesting.org/functional.php">Open source testing</a>. </p> <p> There is still very little material on using mock objects, which is a shame as unit testing without them is a lot more work. The <a href="http://www.sidewize.com/company/mockobjects.pdf">original mock objects paper</a> is very Java focused, but still worth a read. The most authoritive sources are probably <a href="http://mockobjects.com">the original mock objects site</a> and <a href="http://jmock.org/">JMock</a>. Java centric, but tucked away in PDFs they contain some deep knowledge on using mocks from the extended experience of the concept inventors. As a new technology there are plenty of discussions and debate on how to use mocks, often on Wikis such as <a href="http://xpdeveloper.com/cgi-bin/oldwiki.cgi?MockObjects">Extreme Tuesday</a> or <a href="http://www.mockobjects.com/MocksObjectsPaper.html">www.mockobjects.com</a> or <a href="http://c2.com/cgi/wiki?MockObject">the original C2 Wiki</a>. Injecting mocks into a class is the main area of debate for which this <a href="http://www-106.ibm.com/developerworks/java/library/j-mocktest.html">paper on IBM</a> makes a good starting point. </p> <p> There are plenty of web testing tools, but the scriptable ones are mostly are written in Java and tutorials and advice are rather thin on the ground. The only hope is to look at the documentation for <a href="http://httpunit.sourceforge.net/">HTTPUnit</a>, <a href="http://htmlunit.sourceforge.net/">HTMLUnit</a> or <a href="http://jwebunit.sourceforge.net/">JWebUnit</a> and hope for clues. There are some XML driven test frameworks, but again most require Java to run. </p> <p> Most significant is a new generation of tools that run directly in the web browser are now available. These include <a href="http://www.openqa.org/selenium/">Selenium</a> and <a href="http://wtr.rubyforge.org/">Watir</a>. They are non-trivial to set up and slow to run, but can essentially test anything. As SimpleTest does not support JavaScript you would probably have to look at these tools anyway if you have highly dynamic pages. </p> </div> References and related information... <ul><li> <a href="unit_test_documentation.html">Documentation for SimpleTest</a>. </li><li> <a href="http://www.lastcraft.com/first_test_tutorial.php">How to write PHP test cases</a> is a fairly advanced tutorial. </li><li> <a href="http://simpletest.org/api/">SimpleTest API</a> from phpdoc. </li></ul><div class="menu_back"><div class="menu"><a href="index.html">SimpleTest</a> | <span class="chosen">Overview</span> | <a href="unit_test_documentation.html">Unit tester</a> | <a href="group_test_documentation.html">Group tests</a> | <a href="mock_objects_documentation.html">Mock objects</a> | <a href="partial_mocks_documentation.html">Partial mocks</a> | <a href="reporter_documentation.html">Reporting</a> | <a href="expectation_documentation.html">Expectations</a> | <a href="web_tester_documentation.html">Web tester</a> | <a href="form_testing_documentation.html">Testing forms</a> | <a href="authentication_documentation.html">Authentication</a> | <a href="browser_documentation.html">Scriptable browser</a></div></div><div class="copyright"> Copyright<br>Marcus Baker 2006 </div></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -