DBExecuteNonQueryStep ConnectionString takeFromCtx

Nov 27, 2007 at 7:37 PM

Hi,

I'm trying to use the DBExecuteNonQueryStep, with a connection string from an external configuration file:
<TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.DBExecuteNonQueryStep">
<ConnectionString takeFromCtx="ConnectionString" />
...
</TestStep>

the "ConnectionString" context property is loaded from an XML file:
<TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileValidateStep">
<Timeout>0</Timeout>
<Directory>../TestCases</Directory>
<SearchPattern>TestConfig.xml</SearchPattern>
<DeleteFile>false</DeleteFile>

<ContextLoaderStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.XmlContextLoader">
<XPath contextKey="ConnectionString">/configuration/appSettings/add[ @key = 'ConnectionString ']/@value</XPath>
</ContextLoaderStep>
</TestStep>

When I run this test, I get the following error on the DBExecuteNonQueryStep:
System.InvalidOperationException: The ConnectionString property has not been initialized

However, if I hardcode the connection string in the BizUnit test file, the step works successfully.

Am I doing something wrong, or is "takeFromCtx" not supported for this step?

Thanks