From b2e97539e7af7712b04dd5c2610a454d09aa0333 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 7 Jul 2006 23:18:19 +0000 Subject: Update simpletest --- tests/test_tools/simpletest/docs/en/overview.html | 154 ++++++++++------------ 1 file changed, 69 insertions(+), 85 deletions(-) (limited to 'tests/test_tools/simpletest/docs/en/overview.html') diff --git a/tests/test_tools/simpletest/docs/en/overview.html b/tests/test_tools/simpletest/docs/en/overview.html index d4965de3..5d4e80e2 100755 --- a/tests/test_tools/simpletest/docs/en/overview.html +++ b/tests/test_tools/simpletest/docs/en/overview.html @@ -23,9 +23,6 @@ Group tests
  • -Server stubs -
  • -
  • Mock objects
  • @@ -151,8 +148,7 @@ class MySiteTest extends WebTestCase { milestones rather depends on time available. Green stuff has been coded, but not necessarily released yet. If you have a pressing need for a green but unreleased feature - then you should check-out the code from sourceforge CVS directly. - A released feature is marked as "Done". + then you should check-out the code from Sourceforge CVS directly. @@ -163,12 +159,12 @@ class MySiteTest extends WebTestCase { - + - + @@ -176,41 +172,20 @@ class MySiteTest extends WebTestCase { Reading a file with test cases and loading them into a group test automatically - + - + - - - - - - - - - - - + - - - - - - + @@ -218,32 +193,32 @@ class MySiteTest extends WebTestCase { Mocking parts of a class for testing less than a class or for complex simulations - + - + - + - + - + - + @@ -251,25 +226,15 @@ class MySiteTest extends WebTestCase { Allows multi host testing and the integration of acceptance testing extensions - + - - - - - - - - - - - + - + @@ -277,31 +242,39 @@ class MySiteTest extends WebTestCase { Fetching protected web pages with basic authentication only - - - - - - + - + - + - + + + + + + + + + + + - - + + @@ -310,28 +283,43 @@ class MySiteTest extends WebTestCase { - - + + - - + + + + + + + - - + + + + + + + - - + + + + + + +
    Unit test case Core test case class and assertionsDone1.0
    Html display Simplest possible displayDone1.0
    Autoloading of test casesDone1.0
    Mock objects code generatorMock objects Objects capable of simulating other objects removing test dependencies Done
    Server stubs - Mocks without expectations to be used outside of test cases, - e.g. for prototyping - Done
    Integration of other unit testers - The ability to read and simulate test cases from PHPUnit - and PEAR::PhpUnit - Done1.0
    Web test caseBasic pattern matching of fetched pagesDone
    HTML parsing of pages Allows link following and title tag matchingDone1.0
    Partial mocksDone1.0
    Web cookie handling Correct handling of cookies when fetching pagesDone1.0
    Following redirects Page fetching automatically follows 300 redirectsDone1.0
    Form parsing Ability to submit simple forms and read default form valuesDone1.0
    Command line interface Test display without the need of a web browserDone1.0
    Exposure of expectation classes Can create precise tests with mocks as well as test casesDone1.0
    XML output and parsingDone1.0
    Command line test caseAllows testing of utilities and file handlingDone
    PHP Documentor compatibilityFully generated class level documentationDone
    Browser interfaceBrowser component Exposure of lower level web browser interface for more detailed test cases Done1.0
    HTTP authenticationDone
    Browser navigation buttonsBack, forward and retryDone1.0
    SSL support Can connect to https: pagesDone1.0
    Proxy support Can connect via. common proxiesDone1.0
    Frames support Handling of frames in web test casesDone1.0
    File upload testingCan simulate the input type file tag1.0.1
    Mocking interfaces + Can generate mock objects to interfaces as well as classes + and class interfaces are carried for type hints + 1.0.1
    Improved displayBetter web GUI with tree display of test casesReporting machinery enhancementsImproved message passing for better cooperation with IDEs 1.1
    1.1
    File upload testingCan simulate the input type file tagTesting exceptionsSimilar to testing PHP errors 1.1
    Mocking interfacesCan generate mock objects to interfaces as well as classesIFrame supportReads IFrame content that can be refreshed1.1
    Improved mock interfaceMore compact way of expressing mocks 2.0
    Testing exceptionsSimilar to testing PHP errorsHTML table assertionsCan match table elements to numerical assertions2.0
    XPath searching of HTML elementsMore flexible content matching 2.0
    XPath searching of elementsCan make use of HTML tidy for faster and more flexible content matchingAlternate HTML parsersCan detect compiled parsers for performance improvements 2.0
    Javascript suportUse of PECL module to add Javascript3.0
    - PHP5 migraton will start straight after the version 1.1 series, + PHP5 migraton will start straight after the version 1.0.1 series, whereupon PHP4 will no longer be supported. SimpleTest is currently compatible with PHP5, but will not make use of all of the new features until version 2. @@ -374,18 +362,6 @@ class MySiteTest extends WebTestCase { version at least has been upgraded for PHP5 and is recommended if you are porting existing JUnit test cases.

    -

    - Library writers don't seem to ship tests with their code very often - which is a shame. - Library code that includes tests can be more safely refactored and - the test code can act as additional documentation in a fairly standard - form. - This can save trawling the source code for clues when problems occour, - especially when upgrading such a library. - Libraries using SimpleTest for their unit testing include - WACT and - PEAR::XML_HTMLSax. -

    There is currently a sad lack of material on mock objects, which is a shame as unit testing without them is a lot more work. @@ -394,14 +370,15 @@ class MySiteTest extends WebTestCase { As a new technology there are plenty of discussions and debate on how to use mocks, often on Wikis such as Extreme Tuesday - or www.mockobjects.com + or www.mockobjects.com or the original C2 Wiki. Injecting mocks into a class is the main area of debate for which this paper on IBM makes a good starting point.

    - There are plenty of web testing tools, but most are written in Java and + 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 HTTPUnit, @@ -409,6 +386,13 @@ class MySiteTest extends WebTestCase { or JWebUnit and hope for clues. There are some XML driven test frameworks, but again most require Java to run. +

    +

    + A new generation of tools that run directly in the web browser + are now available. + These include + Selenium and + Watir. As SimpleTest does not support JavaScript you would probably have to look at these tools anyway if you have highly dynamic pages. -- cgit v1.2.3