Is it possible to specify a relative path reference in connectionstring, attachDbFileName property in a web.config?
For example, In my database is located in the App
Add the following attributes to the test method:
[DeploymentItem("..\\TestSolutionDir\\TestProjedtDir\\TestDataFolder\\TestAutomationSpreadsheet.xlsx")]
[DataSource("System.Data.Odbc", "Dsn=Excel Files;dbq=|DataDirectory|\\TestAutomationSpreadsheet.xlsx", "SpreadsheetTabName$", DataAccessMethod.Sequential)]
The |DataDirctory| variable is defined by the system when it runs the test. The DeploymentItem copies the spreadsheet there. You point to the spreadsheet and to the tab within the spreadsheet that the data is coming from. Right-click on the tab to rename it to something easy to remember.