I am looking to track (meaning log) each time a test method in my test fixture is executed. We have a text log that our application logs to, and I want to include log entries of when a test case is run. This would help us debug/trace through some of our automated tests, matching up when a certain test is run with the other log entries from our code.
My current solution would require me to assign two attributes to each test method: [Test] [TestLogExecution] public void TestSomething... The TestAttribute of course tells MbUnit to treat this method as a test case, while the TestLogExecutionAttribute would be one that I create and inherit from the DecoratorPatternAttribute, and thereby get myself inserted into the invoking of the test method, at which point I can log IRunInvoker.Name. I would much rather have our developers apply a single attribute if at all possible. Some ideas I thought of were: 1) Have MbUnit allow calling a [SetUp] method that takes as a parameter a MethodInfo object that indicates the method about to be executed. I could then use this to log the MethodInfo.Name during the setup of each test. 2) Have MbUnit allow creating a single attribute that MbUnit would recognize as a test case, but also provide me information (MethodInfo, IRunInvoker) about the test method itself. Any ideas? Both of these would require someone to modify MbUnit (if either are even feasible). Is there an easier solution that I am overlooking? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
