How To Install Reciper Runner


The following how-to is a work in progress - so it's AS-IS.



This How-To detials out the steps to install and test Recipe Runner.


  • Objectives
  • Overview
  • Before you begin
  • Step 1: Unzip and build Recipe Runner
  • Step 2: AddIn Recipe Runner to Visual Studio 2005
  • Step 3: Test simple recipe
  • Step 4: Testing with Recipe Runner
  • Other Links


Recipe Runner is testing tool to develop automated Visual Studio test of recipes created by GAX/GAT. These test can be managed and run by Visual Studio Test Manager. The tool works by creating executing the recipe and asserting if it performed correctly or incorrectly for postive and negative test case types.

Before you begin

You'll need to down load Recipe Runner from: <<add here>> Unzip this into a project area for this How-To.

Step 1: Unzip and build Recipe Runner

Unzip the projects and store them in work area. You'll have the following Solutions:
  • GAXRecipeRunner - runs the recipe
  • GAXTestIntegration - provides an interface to the recipe runner and example of a tested recipe

Perform the following operations:
  • Open the GAXRecipeRunner solution
  • Build the solution
  • This creates the GAXRecipeRunner.dll
  • This file will be reference by Visual Studio so store it in a locations that accessable.

Step 2: Adding the GAX Recipe Runner as a service to Visual Studio 2005

1st Part - Modify the addin file
  • Open the GAXRecipeRunner.sln.
  • Open the Addin directory within the solution
  • Open the file 'GAXRecipeRunner.AddIn'
  • Modify the following line to the location of file 'GAXRecipeRunner.dll'
    • <Assembly>c:/the directory location for /GAXRecipeRunner.dll</Assembly>
  • Save the changes

2nd Part - Add GAX Recipe Runner to Visual Studio
  • Create the directory 'MyDocuments/Visual Studio 2005/Addins' if it doesn't exist.
  • Copy the file 'GAXRecipeRunner.AddIn' to this location

3rd Part of this step
  • Open a new instance of Visual Studio
  • Under Tools, select Addin Manager
  • Should see GAXRecipeRunner, select the start up Checkbox
  • Close Visual Studio

Step 3: Verify that GAX Recipe Runner is installed Correctly

This step will verify that GAX Recipe Runner is installed correctly by running tests against a simple recipe.
  • Open the GAXRecipeRunner.sln.
  • Open the Test View window from the Menu:Test->Windows->Test View
  • Select the test case "RunSimpleRecipe"
  • Run the test - it should Pass
  • Note: I have noted there an werid bug in this test - if passes most the time but fails occansionaly.

Step 4: Testing with GAX Recipe Runner

This steps walks through the following test code snippet found in 'RecipeRunnerFixture.cs'

1st part of this step is to prepare the recipe is to zip up the recipe solution, look through the GAXTestIntegration solution at the SimpleTestingPackageRecipeTests.

2nd part is to setup a the test itself. Look at the file RecipeRunnerFixture in the Simple Tests. A code snippet is below.

    // TestClass
    public class RecipeRunnerFixture : BaseFixture
        public void TestInitialize()
	    // This sets the pointer to the Guidance Package
            this.guidancePackageName = "SimpleTestingPackage";

   	    // This sets the zip package and the solution containing the recipes to be tested

        public override void  TestCleanup()

        // TestMethod
        public void RunSimpleRecipe()
            Project project = VSAutomationHelper.FindProjectByName(dte, "SingleProjectSingleClassSingleProperty");

            // Set recipe arguments - look at the recipe for the inputs.
	    // Load up the hashtable is the sequence that the arguments are expected.
            Hashtable args = new Hashtable();
            args.Add("GeneratedClassName", "Foo");

            //Execute recipe
            recipeRunnerService.RunRecipe(this.guidancePackageName, "AddSimpleClass", args);
	    // This is where we check to see if the test pass or failed - 
	    // expect to do alot of instrumentation 
	    Assert.IsNotNull(recipeRunnerService.LastException, recipeRunnerService.LastException.Message);

            Assert.AreEqual(3, project.ProjectItems.Count);

            //Clean up assets that were product of the recipe execution

            VSAutomationHelper.DeleteProjectItem(project, "Foo.cs");

Last edited Jan 26, 2007 at 6:43 PM by donsmith, version 4


michje May 14, 2007 at 2:05 PM 
I got the same exception. Apparantly, the addin wants to write to the "c:\tmp\gaxlog.txt" log file. On my system the directory ("c:\tmp") didn't exist, but ones added the exception went away...

carlton Mar 29, 2007 at 5:01 AM 
Hi guys, i've seen this error code before. If the target of EnvDTE80.DTE2.ExecuteCommand is an AddIn, the Exec method on IDTCommandTarget must set handled to true before returning of VS will throw this exception. Hope that saves you digging around.

lbrader Mar 1, 2007 at 6:15 AM 
Hey - thanks for bringing this to my attention

Looking at error, I would 1st check to see if GAX is installed correctly. Try and create a recipe.

What OS are you running on?
What version of GAX?

I'll give this another try tomorrow.

I’ll give it another try later on a clean machine.

donsmith Feb 16, 2007 at 8:40 AM 
I'll check with Larry and let you know if there is an update. He also may comment to try to get to the bottom of it. Thanks!

leahx Jan 31, 2007 at 12:45 PM 
Hi Don,
I tried to run step3 and the test didn't pass.

Here is the error message: Initialization method SimpleTestingPackageRecipeTests.RecipeRunnerFixture.TestInitialize threw exception. System.Runtime.InteropServices.COMException: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80040104.

Here is the stack trace:
at EnvDTE80.DTE2.ExecuteCommand(String CommandName, String CommandArgs)
at GaxTestIntegration.Helpers.TestHelper.GetRecipeRunnerService(DTE2 dte) in D:\BluePineProjects\Guidance Pakcage Development\GAX RecipeRunner\GaxTestIntegration\GaxTestIntegration\Helpers\TestHelper.cs:line 38
at GaxTestIntegration.Test.BaseFixture.TestInitialize(Assembly assembly, String resourceName, String solutionFileName) in D:\BluePineProjects\Guidance Pakcage Development\GAX RecipeRunner\GaxTestIntegration\GaxTestIntegration\Test\BaseFixture.cs:line 24
at SimpleTestingPackageRecipeTests.RecipeRunnerFixture.TestInitialize() in D:\BluePineProjects\Guidance Pakcage Development\GAX RecipeRunner\GaxTestIntegration\GaxTestIntegrationTests\RecipeRunnerFixture.cs:line 34

Could you please tell me what went wrong?