[Comunit-users] Test parameters
Brought to you by:
exortech,
kimgrasman
|
From: <kim...@la...> - 2003-11-19 13:21:22
|
Hi all, I received some feedback to my ping mail yesterday, it appears people are still using ComUnit, which is cool. I've been thinking some more about the test parameter deal, and here's my idea: - Define a new interface, ITestContainerParams with a single method: ' Initialized before Setup is called Public Sub SetParameters(TestParameters params) =09 End Sub - The unit runner should attempt to query for the interface when first creating every test container. If it's available, then pass in the parameters collection (or Nothing, if no parameters available). If the interface isn't implemented, this step is ignored, and Setup is called as usual - After this pre-initialization, Setup is called, and the test container implementation can peruse parameters to perform per-container initialization. - All the announced test cases are executed as usual. The difference is that the test container implementation can cache a pointer to the parameters, and re-use it in each test method - I'd like to remove the Parameters property from the TestResult class, since I believe it doesn't belong there. I could leave it to preserve backward compatibility, but I'd prefer to have it removed. Any thoughts on this? If I understand things correctly, the Parameters property is new for ComUnit 1.2 Beta, so hopefully not too many people are using it. That's what I've considered... Any and all feedback is welcome. I'll hack together the changes locally and see how well it works. Thanks, Kim Gr=E4sman |