Tuesday, March 15, 2011

Unit test & TFS/VS updates

First of all, Visual Studio 2010 SP1 was released. On top of that, Visual Studio Power Tools and Team Foundation Power Tools were also updated, you can now get the March 2011 update.

Secondly, I want to give an update on the TFS integration. I have gotten a lot of positive feedback on the TFS build scripts release. No word on anyone actually using or testing it, but I'm hopeful there will be feedback soon. I'm still encouraging people to please contribute their own scripts, no matter how minor you think they may be. Please contact me and I will add you as a developer on the CodePlex project so you can upload your own work.
Meanwhile, I have slightly changed our scripts here to try something new. I figured there may be an easy way to incorporate the standard AX unit tests into the TFS build scripts. Basically, I added a line to the build script that executes an AX test suite from the client command line. This produces an XML file (Unit.xml) in the client configuration log folder, with the results of the unit tests. Next, a C# test project which, instead of performing tests in each test method, basically returns the result of a test method, as read from the XML file AX produced. Very simple to implement, worked like a charm without having to change anything in the TFS workflow (well, I did have to add msbuild back in just like the standard template). Expect that code on CodePlex soon. I will be talking to Microsoft probably this week, since they had another approach to this unit test framework which they wanted to discuss with me. More news on that soon I guess.

Friday, March 11, 2011

AX TFS Build Script - fully released

I have added four more scripts to the CodePlex project on http://dynamicsaxbuild.codeplex.com/ .

1. CleanAOS.ps1 - this script "cleans" the AOS before a build. Move old layers to the old folder, remove indexes (object, label) etc.
2. ExtractXMLCompileMessages.ps1 - this script extracts specific type of messages from the AX compile log XML and outputs them to the standard output
3. BuildScript.ps1 - this is the main script we use in our TFS build, which uses an AXC file to find all the paths, AOS info etc and runs all the scripts for the build.

I have tried to outline the build flow and some comments per script on the documentation tab on the CodePlex project. Feel free to contact me with questions.

Next problem I will tackle and publish code for is the source control integration problem within AX (one-aos/multi-developer, TFS workspace, etc).