Home » .Net FrameworkRSS

Test Case Data Source - Broken Down

Hello,

If you record a test case that has parameters in it and, import that as a coded UI test, you automatically get a data source as such added to your code.

<DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase", "http://tfs.d******l.com:8080/tfs/iec*********on;IECCScalable", "3807", DataAccessMethod.Sequential)> 

How would you break this down in to

Name, ConnectionString, Provider name, so you can open close it etc etc. So it could be used in a config file.

Is this possible?

 

3 Answers Found

 
 

Answer 2

Hey FunnyFox.

I dont want to use Sql, I want to use test  cases as my datasource as per above when it automatically  does it for you. This works perfectly fine if i only want one datasource

But how would i manually great a testcase datasource so i could open  and close  differently datasources throughout the test???

 

Answer 3

Hey FunnyFox.

I dont want to use Sql, I want to use test  cases as my datasource as per above when it automatically  does it for you. This works perfectly fine if i only want one datasource

But how would i manually great a testcase datasource so i could open  and close  differently datasources throughout the test???


Try this post from Mathew: http://blogs.msdn.com/b/mathew_aniyan/archive/2009/04/16/more-on-data-driving-coded-ui-tests.aspx. He gives the format of the data  source near the bottom.

 For <DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase", "http://tfs.d******l.com:8080/tfs/iec*********on;IECCScalable", "3807", DataAccessMethod.Sequential)> , it's

TFS Url: http://tfs.d******l.com:8080/tfs/iec*********on;IECCScalable  (where everything before the semicolon is the project collection, and IECCScalable is the team project)

Work Item (Test Case) ID: 3807

The rest is the same as other testing data sources.

 

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter