Hello Folks - Since my foray into "DataFixture" was limited by the ability to specify only a constant for the XML resource file in the "XmlDataProvider" attribute as opposed to being able to dynamically locating the XML file (will use this methodology as a last resort since it's pretty slick and works great except for the one aforementioned caveat), I decided to dabble with the [TestSuiteFixture] attribute as an alternative. Here's what I have and would appreciate any input to refine this design and assist with one problem -
1) Have a base class called "OspBaseTestCase.cs" that implements the ITestCase interface and also initializesa bunch of services for my application. 2) XML file with all my defined test cases - typically 4 different types are specified in the XML file for QUERY,INSERT, UPDATE & DELETE for a bunch of ORACLE tables 3) 4 helper classes for each of the above mentioned DML transactions that actually execute the transaction, query the tables after the transaction is complete, write the results to a text file, performance comparisons between the generated and expected files and pass/fail the test - all these classe inherit from "OspBaseTestCase.cs". Each of these methods implement the abstract Name, Description property & the Invoke() method inherited from the base class. (I place all the methods to be executed in the Invoke() function) 4) None of the 4 classes QueryTest, InsertTest, UpdateTest or DeleteTest (that implement the ITestCase interface) are tagged with any MbUnit attributes - they just use assert statments to pass/fail tests 5) A helper class "ParseXml.cs" stores all the pertinent information about each one of these tests - including test name, test description, test type etc 6) Have a test suite class called "UnitTestSuite.cs" (uses the [TestSuiteFixture])that reads the XML file - parses it to populate the "ParseXml" object's. I then create instances of the QueryTest, InsertTest, UpdateTest or DeleteTest cases based on the "ParseXml" object type to perform the desired operation and add it to the GetSuite() method that returns a TestSuite object(tagged with the [TestSuite] attribute. In the Main() method, I instantiate the AUTORUNNER object to dynamically run the tests in this DLL Now the problem .... When all the tests pass, I have no problems - all the tests are properly parsed from XML , correctly populated etc. But when any of the ASSERT FAILS in any of tests QueryTest, InsertTest, UpdateTest or DeleteTest, the test craps out and hangs and vehemently complains about unhandled exception. Is it because I have none of these tests tagged with any of the MbUnit fixtures? If so, how do I circumvent this problem. All these methodologies worked very nicely in JUnit and am trying to replicate this for the .NET version too. Thanks for any help any of you can render Ranji --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MbUnit.User" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/MbUnitUser -~----------~----~----~----~------~----~------~--~---
