I have done Unit test classes for the feature i have developed using the in built Unit test framework. And ofcourse i have done it by referring David pokluda's blog which Tony referred which was very useful.
Few more points i can add to this. 1. Create a class by name ObjectName suffix with Test (ObjectNameTest) 2. Create test methods for each method available in the object. (testmethod1) 3. Pass parameters to the methods if necessary based on the functionality. 4. Override method testElementType and return what type of UtilElement it is. 5. Override method testElementName and return The name of your object. Now your Test class is ready Enable Record code coverage in Tool-->Development Tools-->Unit Test-->Parameters Run the class by Right click->run tests. A toolbar appears at the top which states how may methods are passed and how many failed. If you go to the Test Result you can see the code coverage along with result. You can add related Test classes in a single Test suite and run Test suite at once. hope this information is helpful. On 7/28/08, Tony Zeigler <[EMAIL PROTECTED]> wrote: > Yes, unit testing does exist in ax 4.0 - a very well hidden feature :) > However, I must say that it is fairly limited in it's usefulness. Because we > don't get the unit tests that microsoft built, we can't reasonably expect to > produce unit tests for anything remotely close to even 1% code coverage. > Thats the trick see - when you make a mod in axapta your much more likely to > break existing functionality than you are your own mods. > > In any case, for those who still want to use it to test their own mods > visit: > http://blogs.msdn.com/dpokluda/archive/2006/08/25/724280.aspx > > That's the creator's blog about it and it is very informative. > > > --- On Fri, 7/25/08, Vamsi Praneeth <[EMAIL PROTECTED]> wrote: > > From: Vamsi Praneeth <[EMAIL PROTECTED]> > Subject: [development-axapta] Usage of Unit Test Toolbar and Test Suite in > AX 4.0 > To: [email protected] > Date: Friday, July 25, 2008, 9:29 PM > > > > > > > Hello guys, > I have come a across a toolbar called 'Unit Test > Toolbar'in Tool-->Development Tools-->Unit Test. Can someone explain > how to use this? I tried browsing about this feature, I haven't got any > answer regarding the Toolbar instead got another feature or rather a > class type called Test Suite. I tried an example program of it and the > test failed. And, is really unit testing possible in AX 4.0? > > > > > > > > > > > > > > > > > > > [Non-text portions of this message have been removed] > >

