UnittestsRFC #0169: New package unittest.webat 2008-08-14 in RFCs, Unittests by friebeScope of Change A new package unittest.web will be created. It will contain the base class WebTestCase with which web tests can be written. Rationale Integration testing. Read the full RFC here RFC #0150: Before and after methods for testcasesat 2008-01-06 in RFCs, Unittests by friebeScope of Change There will be a way to run methods prior to and after all tests in a TestCase class. In contrast to setUp() and tearDown() they will be run only once per class and not once per test. Rationale Initialize and dispose of resources that are expensive to create, e.g. a server instance, a network connection, ... Read the full RFC here Tracking SQL statements sentat 2007-07-18 in Unittests, Databases by friebeThe XP framework's RDBMS access API offers logging of SQL queries sent to the server by adding observers to database connections: <?php Now SQL statements and other connection events will be logged to the console. For most purposes, this will suffice. If you need to store all SQL statements sent to the server in an array, for example to assert on them in unittest environments, here's how: (more) New TestSuite::addTestClass()at 2006-06-30 in Unittests by friebeThe util.profiling.unittest.TestSuite class features a new method called addTestClass() which makes it quite a bit easier to programmatically run TestCases. Instead of having to loop through all methods using reflection, one can now simply call <?php- it'll take care of adding all methods annotated with @test to the suite. Note: The old way of adding tests will still work! 508 Unit tests!at 2006-06-30 in Unittests by friebeThis includes 29 unittest unittests (yes, the unit test API tests itself RFC #0059: @timeout for unit testsat 2006-06-15 in RFCs, Unittests by friebeScope of Change A timeout facility will be added to unit tests. When a test runs longer than the time span defined by the timeout facility, the test will be marked as timeouted. Rationale Integration tests that test certain system parts such as an LDAP server might want to test not only that accessing the server works but also that a query succeeds in a certain time. Read the full RFC here So You Wanna Write A Unit Testat 2006-05-20 in Unittests, Further reading by friebeStumbled upon this while surfing around the blogosphere: Five things to keep in mind while you are trying to work up the ambition to write that test:The original article is at Russ Olsen's Weblog Code coverageat 2006-05-12 in Unittests, Experiments by friebeThe XP framework's unittesting API has been experimentally extended by a userland code coverage implementation. For an example of a generated code coverage for the util.Binford class, have a look here. (more) SOAP, RPC and JSON unittestsat 2006-05-07 in Unittests by friebeThe unittests from the RPC package, the JSON package and the SOAP package were merged into a new collection of webservices tests, webservices.ini. Together they form 43 tests. XP Core: 100 Unittests and counting!at 2006-05-06 in Announcements, Homepage, Unittests by friebeResults for test suite run at Sun, 07 May 2006 13:31:22 +0200: 107 tests, 107 succeeded, 0 failed, 0 skipped We started developing unittests to ensure the XP framework's core components' functionality a while ago and have continued doing so. With the implementation of RFC #0055 (new xp::stringOf()) the number of core tests has now exceeded one hundred! (more) |
|