Problem testing pipeline

May 13, 2011 at 11:04 AM

Hi,

I've got a problem testing a very basic pipeline.
The exception "BizUnit encountered an error executing a test step" wasn't really helpful, because it had an empty innerexception.

When stepping through the source code, it seems there is a problem with the schema, because the error originates after executing line 212 in ExecuteReceivePipelineStep.cs: pipelineWrapper.AddDocSpec(docSpec).

Could you take a look at this please?

 

Full source code of my test project: http://cid-708ab029f6f67917.office.live.com/self.aspx/Openbaar/BizUnit4^_TestProject.zip

 

Thank you in advance!

Jan 24, 2012 at 12:18 PM
Edited Jan 25, 2012 at 9:12 AM

using System;
using BizUnit.TestSteps.BizTalk.Pipeline;
using BizUnit.Xaml;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Reflection;

namespace BizUnit4_TestProject
{
    [TestClass]
    public class PipelineTest
    {
        [TestMethod]
        public void TestReceivePipeline()
        {
           
                // Create the test case
                var testCase = new TestCase { };

                // Create test steps...
                var docSpecDefinition = new DocSpecDefinition();
                docSpecDefinition.AssemblyPath = Assembly.GetAssembly(typeof(BizUnit4_BizProject.Schemas.TestSchema)).CodeBase; //@"C:\Downloads\Openbaar\BizUnit4_TestProject\BizUnit4_BizProject\bin\Debug\BizUnit4_BizProject.dll";
               // docSpecDefinition.TypeName = "BizUnit4_BizProject.Schemas.TestSchema";
                docSpecDefinition.TypeName = typeof(BizUnit4_BizProject.Schemas.TestSchema).FullName;

                var executeReceivePipelineStep = new ExecuteReceivePipelineStep();
                executeReceivePipelineStep.Source = @"C:\Downloads\Openbaar\BizUnit4_TestProject\BizUnit4_BizProject\Messages\testFile.xml";
                executeReceivePipelineStep.DestinationDir = @"c:\Temp";
                executeReceivePipelineStep.DestinationFileFormat = "m.xml";
                executeReceivePipelineStep.PipelineAssemblyPath = Assembly.GetAssembly(typeof(BizUnit4_BizProject.Pipelines.Test_ReceivePipeline)).CodeBase;
                executeReceivePipelineStep.PipelineTypeName = typeof(BizUnit4_BizProject.Pipelines.Test_ReceivePipeline).FullName;
                
                executeReceivePipelineStep.DocSpecs.Add(docSpecDefinition);

                // Add test steps to the required test stage
                testCase.ExecutionSteps.Add(executeReceivePipelineStep);

                // Create a new instance of BizUnit and run the test
                var bizUnit = new BizUnit.BizUnit(testCase);
           
                bizUnit.RunTest();
            
           
           
        }
    }
}