Re: [Pyunit-interest] intro & Questions
Brought to you by:
purcell
From: Bill B. <bb...@co...> - 2001-02-15 21:09:20
|
Ok-- after several on-list and off-list responses and a bunch more thinking, I think I can paint a clearer picture of the problem I'm having with maintaining state. In particular, testing a modern web based application involves both maintaining state between request/responses AND possible branching of execution/testing. Example; I want to write a test that tests the sequence of events that involve checking out of an ecommerce store. There are typically two distinct paths to take-- as a registered user and as an unregistered user-- that have a tremendous number of steps in common. As such, it would be useful to be able to test, say, the address-entry->credit-card-entry->order-confirmation sequence of pages as a single TestCase with two OTHER test cases that test new-user vs. registered-user functionality. Pick one of new-user, registered-user... go through test cases... hand control to the address/cc/order-confirmation test. However, this requires the preservation of a minimal amount of state between tests; i.e. I need to keep around the state resulting from the last response generated by the registered user or new user path to pass into the address/cc/order-confirmation test as the foundation of state for that test. I understand that this violates the idea that TestCases should each start with a clean slate. However, I also firmly believe that there are numerous situations within which starting from a clean slate is not really testing the system. Finally, I want to be able to run multiple test suites simultaneously within a single Python VM. In particular, it is often the case that the only effective way to test an application for, say, threading issues or other multiuser related issues is to run the app through its paces from multiple clients simultaneously. b.bum |