Declined
Last Updated: 14 Dec 2023 14:23 by ADMIN
ADMIN
Cody
Created on: 18 Apr 2013 19:42
Type: Feature Request
2
Support |DataDirectory| in VS plug-in
Visual Studio data driven coded unit tests support specifying the datasource using a |DataDirectory| substitution string (see http://msdn.microsoft.com/en-us/library/vstudio/cc716756(v=vs.100).aspx). Some customers would like to be able to use it when binding a Test Studio data driven test to a SQL data source.
4 comments
Kirk
Posted on: 27 Sep 2013 17:37
Dear Telerik,

We are still very interested in this feature.  We have several people using our Telerik solution at this point and it's becoming increasingly difficult to manage all of the static datasource paths based on each persons machine.

If we can get this fixed we'd really appreciate it!


Thank you.
Kirk
Posted on: 18 Apr 2013 21:34
Updating with original ticket post.  It's important to understand that the |DataDirectory| variable is equating to something, but not the expected value when using Telerik.  It's failing to follow the guidelines that the variable adheres to.

In a C# Unit Test |DataDirectory| equates as illustrated(expected) below
 
[TestMethod]
 [DataSource("System.Data.SqlServerCe.4.0", "Data Source=|DataDirectory|\\Data\\Test.sdf;Persist Security Info=True", "SomeTable", DataAccessMethod.Random)]
 public void TestMethod1() { }
 
|DataDirectory| = C:\Users\UserABC\Documents\Visual Studio 2012\Projects\Primary\bin\Debug\Data\Test.sdf
 
-----------
 
When creating a new datasource and binding it to a Telerik test |DataDirectory| equates as illustrated below wherein it cannot be found
 
Create new data source window:
 Select: Database Icon
 Provider: Microsoft SQL Server Compact Data Provider 4.0
 Connection String: Data Source=|DataDirectory|\Data\Test.sdf;Persist Security Info=True
 
|DataDirectory| = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Data\Test.sdf
 
Error when clicking "Test" button:
 ---------------------------
 Telerik - Test Studio
 ---------------------------
 Connection Failed!
 
System.Data.SqlServerCe.SqlCeException (0x80004005): The path is not valid. Check the directory for the database. [ Path = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Data\Test.sdf ]
 
   at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
 
   at System.Data.SqlServerCe.SqlCeConnection.Open()
 
   at ArtOfTest.Common.Design.Data.DbDataSource.TestConnectionString(String invariantProviderName, String connectionString, String& error)
 ---------------------------
 OK   
---------------------------
Pablo
Posted on: 18 Apr 2013 21:25
Please, having this feature will really help us.
Kirk
Posted on: 18 Apr 2013 21:18
We really need this feature as it prevents us from using builtin databinding to relative database paths.