In the build script I write the value of the variable in the test's app.config file. In ConnectionStrings, so when the data/integration test run, it connects to appveyors db, instead of a local db.
The tests are using the correct ConnectionString as I am writing it in console:
Running tests against Server=(local)\SQL2017;Database=technical_assessment_test;User ID=sa;Password=Password12!
The problem is when the test try to connects to the database, as the error is shown:
System.Data.SqlClient.SqlException : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)