The test step could not be created, check the test step type and assembly path are correct

Jul 2, 2009 at 8:16 AM

Unfortunately, BizUnit is giving me a very hard time to get even the sample working. I've already spent 1 full day without luck.

I've installed BizUnit and deployed and started the BizTalk project (there were some binding issues, but now it runs).

I'm running the tests in Visual Studio, because NUnit says that "This assembly was not built with any known testing framework".

Now when I try to run the samples, I get the following exception:

Class Initialization method SampleSolutionFunctionalTests.UnitTest1.SetUp threw exception. System.ArgumentException:  System.ArgumentException: The test step could not be created, check the test step type and assembly path are correct, type: Microsoft.Services.BizTalkApplicationFramework.BizUnit.HostConductorStep, assembly path: .

I've tried to put BizUnit.dll and BizUnit.BizTalkSteps.dll in the GAC, but this did not help. 

Then I tried to change the assemblyPath in Test_Setup.xml to "C:\Program Files\BizUnit\BizUnit 3.0\bins\BizUnit.BizTalkSteps.dll", but then I get the following error:

Class Initialization method SampleSolutionFunctionalTests.UnitTest1.SetUp threw exception. System.TypeLoadException:  System.TypeLoadException: Could not load type 'Microsoft.Services.BizTalkApplicationFramework.BizUnit.HostConductorStep' from assembly 'BizUnit.BizTalkSteps, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7eb7d82981ae5162'..

What I'm looking for (I think) is a step-by-step guide to get the samples running.

Kind regards,

Martin

 

Coordinator
Jul 8, 2009 at 8:25 PM

Hi Martin,

 

BizUnit uses reflection to load test steps, you can either specify the typename or the typename + assembly path for the step. v3.0 had some out of date test cases in the "SampleSolutionFunctionalTests", specifically Test_Setup.xml wasn't correctly specifying the typename of the HostConductorStep, this should be fixed in v3.1 where the TestStep is defined as follows:

<TestStep assemblyPath="" typeName="BizUnit.BizTalkSteps.HostConductorStep, BizUnit.BizTalkSteps, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7eb7d82981ae5162">

 

Note, you can fix up v3.0 by changing the version number above to:

<TestStep assemblyPath="" typeName="BizUnit.BizTalkSteps.HostConductorStep, BizUnit.BizTalkSteps, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7eb7d82981ae5162">

 

Thanks,

 

Kevin

Jan 7, 2010 at 10:40 AM
Edited Jan 7, 2010 at 10:44 AM

Hi I am using the latest version of BizUnit (3.1) and also do not succeed in getting the Test_Setup.xml to work.

The PublicKeyToken of the BizUnit.BizTalkSteps dll in GAC is 8ab3cc29608bfce0

I tried some Teststep definitions like:

<TestStep assemblyPath="" typeName="BizUnit.BizTalkSteps.HostConductorStep, BizUnit.BizTalkSteps, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7eb7d82981ae5162">
Error
Class Initialization method SampleSolutionFunctionalTests.UnitTest1.SetUp threw exception. System.ArgumentException: System.ArgumentException: The test step could not be created, check the test step type and assembly path are correct, type: BizUnit.BizTalkSteps.HostConductorStep, BizUnit.BizTalkSteps, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7eb7d82981ae5162, assembly path: .

<TestStep assemblyPath="" typeName="BizUnit.BizTalkSteps.HostConductorStep, BizUnit.BizTalkSteps, Version=3.1.0.0, Culture=neutral, PublicKeyToken=8ab3cc29608bfce0">
Error:
Class Initialization method SampleSolutionFunctionalTests.UnitTest1.SetUp threw exception. BizUnit.TestStepExecutionException: BizUnit.TestStepExecutionException: BizUnit encountered an error executing a test step ---> System.NullReferenceException: Object reference not set to an instance of an object.

<TestStep assemblyPath="C:\Program Files\BizUnit\BizUnit 3.1\bins\BizUnit.BizTalkSteps.dll" typeName="BizUnit.BizTalkSteps.HostConductorStep, BizUnit.BizTalkSteps, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7eb7d82981ae5162">
Error:
Class Initialization method SampleSolutionFunctionalTests.UnitTest1.SetUp threw exception. System.ArgumentException: System.ArgumentException: Type names passed to Assembly.GetType() must not specify an assembly..

<TestStep assemblyPath="C:\Program Files\BizUnit\BizUnit 3.1\bins\BizUnit.BizTalkSteps.dll" typeName="BizUnit.BizTalkSteps.HostConductorStep, BizUnit.BizTalkSteps, Version=3.1.0.0, Culture=neutral, PublicKeyToken=8ab3cc29608bfce0">
Error:
Class Initialization method SampleSolutionFunctionalTests.UnitTest1.SetUp threw exception. System.ArgumentException: System.ArgumentException: Type names passed to Assembly.GetType() must not specify an assembly..

<TestStep assemblyPath="" typeName="BizUnit.BizTalkSteps.HostConductorStep">
Error:
Class Initialization method SampleSolutionFunctionalTests.UnitTest1.SetUp threw exception. System.ArgumentException: System.ArgumentException: The test step could not be created, check the test step type and assembly path are correct, type: BizUnit.BizTalkSteps.HostConductorStep, assembly path: .

The iisreset step in the Test_Setup.xml file does work. So I am not able to address the assembly the correct way.

Any ideas?

Thanks in advance.

Kees

Jan 14, 2010 at 4:29 PM

Hi Kees,

I managed to get it working by changing the xml definition to:

<TestStep assemblyPath="" typeName="BizUnit.BizTalkSteps.HostConductorStep, BizUnit.BizTalkSteps">

This assumes you have a reference to the BizUnit.BizTalkSteps.dll and it is copied to the folder where the test is run (or i guess the assemblyPath is set).

I also had to add a <Server>.</Server> node to get it to work as this seems to be required. In the sample it only has the <Action> and <HostInstanceName> ones set.

Colin