After spending a great week with attendees at the Microsoft Dynamics GP Technical Conference 2009 in Fargo, I decided to try my hand at contributing to the Developing for Dynamics GP blog. I am a Test Engineer on the GP team focusing on Dexterity and as such I had the pleasure to present a Dynamics GP Testing 101 session at the Conference with my teammate Grant Swenson. So today I wanted to highlight the key takeaways from the session as well as provide links to a couple of great reference materials that are available today.
First off, when thinking about how to approach creating a test environment for your solution, take some time to identify the areas you need to test in and the starting point that can provide a good foundation for your tests. Do you need a large set of starting data or will a smaller subset do? On the environmental side, are there integrating applications, printers or things like specific date, time or currency formatting you need to utilize in your solution? Once you have identified these things, determine how you will get your system back to this starting point after testing has been done. That may mean taking database backups to restore later or using BCP to pull the data out, etc. Whatever that method is, the first critical part in starting the testing process is figuring out how to replicate and return to your starting point. If there was one piece of information for attendees at the presentation to take away it is that consistency is key. Replicating the same environment you first created tests in to rerun them and verify the results can give you a big boost towards success and make things like troubleshooting errors much, much easier to do.
Secondly, there are all sorts of tips for creating Dexterity macros or doing things like SRS testing. The main thing to remember here is that you want to start off taking small steps. Don’t try to cover every scenario and have all the data you possibly can be recorded or sent out to an output file. This gets to be quite a chore to verify and most times will leave you frustrated with the whole process. By approaching a small piece of your solution, figuring out the data you will need for that piece and then recording a macro to test that part, can oftentimes be the best way to start. It can also help you to provide some very useful feedback to the rest of the development team much sooner on the quality of a feature or product.
For those who are looking into bringing automated tests into their development environments, there are two released resources available today that can help paint the full picture of the considerations to take and how to start when recording macros for your Dexterity solutions. The first is in the Dexterity documentation. The document to look at is called the Programmer’s Guide Volume 2 and more specifically in Chapter 34: Testing Your Application. Now, if you aren’t a developer don’t be scared away by the word "Programmer’s" in the title. This is a great all around resource that describes the Dexterity macro system that can be used for business logic automation or for testing so be sure to check it out. The second resource that really pulls all the pieces together for you when starting down the automation path is the whitepaper called, "Recording Test Cases with the Macro System" (also attached). This is found on the Microsoft site and walks through the importance of creating a starting point, how to get started with macros and helpful .ini settings as well as what to do after you have created your first macros.
Check these two resources out and see if you can take the first or next step into bringing some automation into your development organization. There are numerous benefits including increasing the overall chances of having successful deployments at your site or your customer sites as well as lowering the overall cost of a project by finding defects in the solution before it goes the door. At the conference we also previewed a test automation framework sample. Stay tuned for more information to come on that once we find a good home for it to be shared with you!
Have a great day and happy testing!