Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Is it possible to change table when using VSTS DataBindings?
 

Is it possible to change table when using VSTS DataBindings?

I am trying to create automated cases that will be data driven each testcase will store the data in a different Excel Spread sheet. The only way I can see to change the spreadSheet at the moment is by updating the App.Config File to be something like below

<configuration>

<configSections>

<section name="microsoft.visualstudio.testtools" type="Microsoft.VisualStudio.TestTools.UnitTesting.TestConfigurationSection, Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

</configSections>

<connectionStrings>

<add name="ExampleExcelConn" connectionString="Dsn=Excel Files;dbq=Example.xlsx;defaultdir=.; driverid=790;maxbuffersize=2048;pagetimeout=5" providerName="System.Data.Odbc" />

</connectionStrings>

<microsoft.visualstudio.testtools>

<dataSources>

<add name="ExampleDataSource" connectionString="ExampleExcelConn" dataTableName="TestCase1$" dataAccessMethod="Sequential"/>

<add name="ExampleDataSource" connectionString="ExampleExcelConn2" dataTableName="TestCase2$" dataAccessMethod="Sequential"/>

<!-- the two above are accessing different dataTables-->

</dataSources>

</microsoft.visualstudio.testtools>

<appSettings>

<add key="environment" value="B118_GTL_Test"/>

<add key="service" value="GTL_Test"/>

<add key="CSDir" value=""/>

<add key="ApplicationName" value="BedrockShell"/>

</appSettings>

</configuration>

Is there a way to update the dataTableName dynamically so that I can use the same dataSource in 1 file for all those testcases?

Rob Gray  Thursday, January 31, 2008 6:45 PM
Hi,

Please post this question to a database forum, this forum is for GAX-related questions only.

thanks,
-Victor.
vga  Thursday, January 31, 2008 11:21 PM
Hi,

Please post this question to a database forum, this forum is for GAX-related questions only.

thanks,
-Victor.
vga  Thursday, January 31, 2008 11:21 PM

You can use google to search for other answers

Custom Search

More Threads

• What is the status of GAT? Why not use Codesmith?
• Set version for Guidance Package
• GAX Templates do not load
• How do i use the project name entered in the VS wizard
• Modify WCF Guidance Package
• Evaluator ValueProvider error
• URGENT: Project and Item Templates issue!
• Guidance package manager not enabled
• T4 in a custom tool
• GAX and templates in VS