I'm Joris "Interface" de Gruyter. Welcome To My

Code Crib

Test-Driven Development in AX 2012 - Intro

Nov 28, 2012
Filed under: #daxmusings #bizapps

As much as we all like our product of choice (Dynamics AX) and our jobs (developers, developers, developers, developers), we have to admit one thing: our Dynamics AX industry’s professionalism in software engineering principles is at its infancy. From my blog posts about TFS I know there is a lot of interest in source control, and the tooling around it that TFS provides. I also know from the types of questions I get, that there are not a lot of people/companies out there actually using version control to its fullest, some companies aren’t using version control at all. For a critical business application that is so technical, that is stunning.

Another topic of software engineering is unit testing. AX has sported a unit test framework for a few versions now, but similar to the version control topic, adoption of this feature is minimal.

So, after picking up some independent background information on unit testing, I decided to apply some of these principles on an internal project building some implementation tools. Granted, technical solutions are easier to test than functional modifications. However, after reading more on the subject, it’s become clear that it’s all about the approach. Unit testing can influence your design in a good way. Although you don’t want to change your design to make it testable, in a lot of cases keeping testability in mind will lead to better design choices, and testability may come almost automatically.

I think for the most part unit testing, its use, and definitely the practicality of test-driven development is a topic for heated discussions and is definitely not a wide-used practice. So, in the interest of getting a debate going, I will publish a few posts on the topic of unit testing and test-driven development.

To get some background info, I purchased the book “The Art of Unit Testing”. The main attraction for me was the overall explanation of concepts rather than focusing too much on a specific product, framework, IDE or language (granted, it does say “with examples in .NET” and there are specific uses of frameworks). Some of the reviews complained that the book doesn’t go far enough, but I thought it was a perfect introduction to get me going on experimenting with unit testing. Just to get it out of the way, I do not have any affiliation with the author, publisher or Amazon.com. I did like the book as an introduction, but your mileage may vary.

Stay tuned for detailed examples and suggestions for all your unit testing needs :-)

 

There is no comment section here, but I would love to hear your thoughts! Get in touch!

Blog Links

Blog Post Collections

Recent Posts