Tuesday, June 28, 2011

Unit Tests - Revisited

As I have posted on this blog previously, we at Streamline Systems have done some minor testing and created a small framework to be able to run unit tests during our TFS builds. The reason I have not put this up on the CodePlex AX build project yet is that the solution is not entirely elegant... it requires a C# unit test project be created, and a wrapper method for each test method in AX.
However, after talking with Dave Froslie at Microsoft and some investigation (my Visual Studio skills are still a work-in-progress), there exists such a thing as a "generic" unit test in Visual Studio. Basically, this is a one-time unit test project, which wraps a command line process and takes an output file from that (.trx file).
I've not created an actual test on this, but the .trx file is basically an XML file, so the only thing required would be an XSL transformation. And as far as that goes, one could extend the standard AX unit test XML output class and transform the output before writing to file.

Since we'll be working on converting our build processes to AX2012 soon, I'm expecting us to implement this for AX2012 (which I think last beta build I looked at, it was still the same code for XML output of unit tests).

No comments:

Post a Comment